Created
February 13, 2012 04:41
-
-
Save jay3686/1813737 to your computer and use it in GitHub Desktop.
Python Answer to Embedly's Challenge 1
This file contains 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
def badr(n): | |
return 1 if n is 1 else n * badr(n - 1) | |
n = 1; | |
while(reduce(lambda x, y: int(x) + int(y), str(badr(n))) != 8001): | |
n = n + 1 | |
print n; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment