Project Euler #15: Lattice paths

  • + 0 comments
    #python
    import math
    for i in range(int(input())):
        n, m=map(int, input().split())
        print(math.comb(n+m, m) %(10**9+7))