#21934: _TLE


smith990547@gmail.com (吳冠辰)

學校 : 國立臺東大學
編號 : 109519
來源 : [140.127.42.131]
最後登入時間 :
2025-07-30 16:48:59

如何優化??

import math

try:

    while True:

        a,b=map(int,input().split())

        f_a = math.factorial(a)

        f_b = math.factorial(b)

        f_c = math.factorial(a-b)

        ans = f_a // (f_b * f_c)

        ans1 = str(ans)

        print(len(ans1))

except EOFError:

    pass