Advertisement
Indivicivet

Project Euler Problem 20, solution by Indi

Jul 10th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. # Project Euler Problem 20, solution by Indi
  2.  
  3. # python has us covered
  4. from math import factorial
  5.  
  6. digits = [int(d) for d in str(factorial(100))]
  7. print(sum(digits)) #648
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement