• + 0 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