title: Factorial CodeChef error (C++)
body: <p>I'm getting WRONG ANSWER on CodeChef for the following problem even though my answer exactly matches the output. Please help.</p>
  
  <p>PROBLEM: </p>
  
  <p>For any positive integer N, Z(N) is the number of zeros at the end of the decimal  form of number N!. </p>
  
  <p><strong>Input</strong></p>
  
  <p>There is a single positive integer T on the first line of input (equal to about 100000). It stands for the number of numbers to follow. Then there are T lines, each containing exactly one positive integer number N, 1 &lt;= N &lt;= 1000000000.</p>
  
  <p><strong>Output</strong></p>
  
  <p>For every number N, output a single line containing the single non-negative integer Z(N).
  Example</p>
  
  <pre><code>Sample Input:
  6
  3
  60
  100
  1024
  23456
  8735373
  
  
  Sample Output:
  0
  14
  24
  253
  5861
  2183837
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>`#include&lt;iostream&gt;
   #include&lt;math.h&gt;
   #include&lt;vector&gt;
   using namespace std;
  
   long long int z(long long int n)
   {    long long int p = 1, count = 0;
   while(n&gt;(pow(5,p)))
   {
      count = count + n/(pow(5,p));
      p++;
   }
   return count;
   }
  
  int main()
  {
      long long int T,n;
      cin&gt;&gt;T;
      vector&lt;long long int&gt; myVector;
  
      for (int i=0; i&lt;T; i++)
      {
          cin&gt;&gt;n;
          myVector.push_back(z(n));
      }
  
      for(int k=0; k&lt;T; k++)
      {
          cout&lt;&lt;myVector[k]&lt;&lt;endl;
      }
  }
  </code></pre>