给定m,n 输出C(m,n)%3.
题目:给定m,n 输出C(m,n)%3.
我这个答案为啥通过率只有 9% ,哪里有问题啊?
while True: try: def fact(a): if a == 1: return 1 else: return a * fact(a-1) def c(m, n): return fact(m) / (fact(n) * fact(m - n)) m, n = map(int, input().split()) print(int(c(m, n) % 3)) except: break