hdarwin

cstutoringcenter.com_Factorials Fun

Jan 7th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def factorial(n):
  2.     if n == 1: return 1
  3.     return factorial(n-1)*n
  4. sum = 0
  5. for y in list(str(factorial(100))):
  6.     if y == '0':sum += 1
  7. print sum
Advertisement
Add Comment
Please, Sign In to add comment