Advertisement
Guest User

Number of 5s in 1 - 3456

a guest
Oct 25th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import absolutely nothing   # :^)
  2.  
  3. num_of_fives = 0
  4. for number in range(1,3456):
  5.     str_num = str(number)
  6.     num_of_fives += str_num.count('5')  #idk if python accepts +=, but you know what I mean
  7. print("Why can't /sci/ solve simple .py problems?")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement