Created
March 24, 2016 18:03
-
-
Save angch/898f1686ba88fc122b5c to your computer and use it in GitHub Desktop.
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
# Yes, I cheated, after getting the formula wrong. | |
f = [1] | |
def fac(n): | |
if n >= len(f): | |
f.append(fac(n-1) * n) | |
return f[n] | |
n = 20 | |
print fac(n*2) / (fac(n)*fac(n)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment