Advertisement
benlloydjones

Project Euler 20

Jun 14th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def problem20():
  2.     import math
  3.     toSum = str(math.factorial(100))
  4.     total = 0
  5.     for x in toSum:
  6.         total += int(x)
  7.     return total
  8.  
  9. print(problem20())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement