fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. long long int ile,k;
  6. int t;
  7. scanf("%d",&t);
  8. while(t--)
  9. {
  10. ile=0;
  11. scanf("%lld",&k);
  12. while(k>=5)
  13. {
  14. ile+=k/5;
  15. k/=5;
  16. }
  17. printf("%lld\n",ile);
  18. }
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 9432KB
stdin
5
0
1
10
100
10000000
stdout
0
0
2
24
2499999