結果

問題 No.250 atetubouのzetubou
ユーザー convexineqconvexineq
提出日時 2020-12-11 06:16:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 311 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 81,628 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2023-10-20 01:17:18
合計ジャッジ時間 3,733 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
76,772 KB
testcase_01 AC 63 ms
68,240 KB
testcase_02 AC 112 ms
76,016 KB
testcase_03 AC 117 ms
76,768 KB
testcase_04 AC 115 ms
76,772 KB
testcase_05 AC 117 ms
76,760 KB
testcase_06 AC 109 ms
76,852 KB
testcase_07 AC 97 ms
76,620 KB
testcase_08 AC 111 ms
76,016 KB
testcase_09 AC 106 ms
76,012 KB
testcase_10 AC 117 ms
76,312 KB
testcase_11 AC 105 ms
76,008 KB
testcase_12 AC 113 ms
76,772 KB
testcase_13 AC 105 ms
76,768 KB
testcase_14 AC 38 ms
53,452 KB
testcase_15 AC 140 ms
77,032 KB
testcase_16 AC 141 ms
77,056 KB
testcase_17 AC 138 ms
77,040 KB
testcase_18 AC 141 ms
76,344 KB
testcase_19 AC 138 ms
77,036 KB
testcase_20 AC 38 ms
53,452 KB
testcase_21 AC 37 ms
53,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def check(a,x,t): #aCx <= T ?
    if x >= (a+1)//2: x = a-x
    r = 1
    for i in range(1,x+1):
        r *= a-i+1
        r //= i
        if r > t: return 0
    return r <= t

q = int(input())
for _ in range(q):
    d,x,t = map(int,input().split())
    a = d+x-1
    print("AC" if check(a,x,t) else "ZETUBOU")
0