fork(1) download
  1. for n in range(int(raw_input())):
  2. curr_num = int(raw_input())
  3. assert curr_num >= 1
  4. assert curr_num <= 1000000000
  5. ctr = 0
  6.  
  7. def my_range(start, stop, step):
  8. i = start
  9. while i < stop:
  10. yield i
  11. i *= step
  12.  
  13. for x in my_range(5, curr_num, 5):
  14. ctr += (curr_num // x)
  15. print ctr
Success #stdin #stdout 0.01s 7696KB
stdin
6
3
60
100
1024
23456
8735373
stdout
0
14
24
253
5861
2183837