Skip to content

Instantly share code, notes, and snippets.

@lfranchi
Created February 10, 2012 21:27
Show Gist options
  • Select an option

  • Save lfranchi/1793010 to your computer and use it in GitHub Desktop.

Select an option

Save lfranchi/1793010 to your computer and use it in GitHub Desktop.
import math
def countDigits(n):
asStr = str(n)
sum = 0
for char in asStr:
sum += int(char)
return sum
cur = 0
while True:
if countDigits(math.factorial(cur)) == 8001:
print "Got answer: %s" % cur
cur += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment