Assuming that your code is meant to be this:
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int t;
cin>>t;
int n[t];
for (int i=0; i<t; i++)
{
cin>>n[i];
}
for (int i=0; i<t; i++)
{
int v=0;
int j=1;
do
{
v+= n[i]/(pow(5,j));
j++;
}
while(pow(5,j)<n[i]);
cout<<v<<endl;
}
return 0;
}
try this case:
4
24
25
29
30