Skip to content

Instantly share code, notes, and snippets.

@shieldsd
Created March 22, 2012 09:37
Show Gist options
  • Save shieldsd/2157353 to your computer and use it in GitHub Desktop.
Save shieldsd/2157353 to your computer and use it in GitHub Desktop.
Project Euler #20
def fact(n):
s = 1
while n > 0:
s = s * n
n -= 1
return s
print sum(int(c) for c in str(fact(100)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment