include stdio int main int scanf for scanf int res int while res print

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include "stdio.h"
int main()
{
int i,t,x;
scanf("%d", &t);
for(i=0; i<t; i++)
{
scanf("%d", &x);
int res = 0;
int d = 5;
while(d<x) {
res+=x/d;
d*=5;
}
printf("%d\n", res);
}
return 0;
}