Created
December 1, 2009 19:49
-
-
Save russelnickson/246579 to your computer and use it in GitHub Desktop.
n! means n (n 1) ... 3 2 1 Find the sum of the digits in the number 100! ??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=100 | |
b=0 | |
f1=1 | |
while a>1: | |
f1=a*f1 | |
a-=1 | |
f=f1 | |
while f: | |
b=b+f%10 | |
f/=10 | |
print b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment