You are viewing a single comment's thread. Return to all comments →
solved as a comb def solve(n, m): return (math.factorial(n+m-1)//(math.factorial(m-1)*math.factorial(n))) % (10**9+7)
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Permutations
You are viewing a single comment's thread. Return to all comments →
solved as a comb def solve(n, m): return (math.factorial(n+m-1)//(math.factorial(m-1)*math.factorial(n))) % (10**9+7)