fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int i,n,t,count;
  7. cin>>t;
  8. for(i=0;i<t;i++)
  9. {
  10. cin>>n;
  11. count=0;
  12. while(n>=5)
  13. {
  14. n=n/5;
  15. count=count + n;
  16. }
  17. cout<<count<<"\n";
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0s 15240KB
stdin
6
3
60
100
1024
23456
8735373
stdout
0
14
24
253
5861
2183837