You are viewing a single comment's thread. Return to all comments →
5 test passes, anyone can recode my solution please
def solve(n, r): fact = 1 for i in range(max(r, n-r)+1, n+1): fact*=i return (fact//math.factorial(min(r, n-r)))%142857
Seems like cookies are disabled on this browser, please enable them to open this website
nCr
You are viewing a single comment's thread. Return to all comments →
5 test passes, anyone can recode my solution please