Last active
September 11, 2020 21:07
-
-
Save betaprojects/26fbeec9b298bd56a5b35f3e47c59cd9 to your computer and use it in GitHub Desktop.
Project Euler & HackerRank problem 15 solution: Lattice paths - solved using Python
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
from math import factorial as f | |
n, m = map(int, input("Enter dimensions (separate by space)?").split()) | |
print ("Routes through a", n, "x", m, "grid", f(n+m) // f(n) // f(m)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment