結果

問題 No.250 atetubouのzetubou
ユーザー yumechi
提出日時 2016-03-11 02:16:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 82,480 KB
実行使用メモリ 82,540 KB
最終ジャッジ日時 2024-09-24 23:39:23
合計ジャッジ時間 7,185 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    fact = [1]*3001
    s = 1
    for i in range(1, 3001):
        fact[i] = s
        s *= i
    
    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