結果

問題 No.250 atetubouのzetubou
ユーザー yumechi
提出日時 2016-03-16 13:50:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 370 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 85,740 KB
最終ジャッジ日時 2024-10-01 20:13:22
合計ジャッジ時間 15,667 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 1 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial
 
def solve():
    fact = [factorial(i) for i in range(1, 3001)]
 
    for i in range(int(input())):
        d, x, t = map(int, input().split())
        n = (d + x - 1)
        r = x if (n//2 > x) else (n - x)
        ans = fact[n] // (fact[n - r] * fact[r])
        print("AC" if ans <= t else "ZETUBOU")

if __name__=="__main__":
    solve()
0