fork(1) download
  1. long long r,t,a,b=1,z;
  2. main()
  3. {
  4. for(scanf("%lld",&a);b<=a;b++)
  5. {
  6. for(t=b;t;)z+=!!(t/=5);
  7. printf("%lld: %lld\n",b,z);
  8. }
  9. printf("%lld",z);
  10. }
Success #stdin #stdout 0s 4716KB
stdin
11
stdout
1: 0
2: 0
3: 0
4: 0
5: 1
6: 2
7: 3
8: 4
9: 5
10: 6
11: 7
7