結果

問題 No.250 atetubouのzetubou
ユーザー 👑 yumechiyumechi
提出日時 2016-03-11 02:23:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 467 ms / 5,000 ms
コード長 492 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 81,696 KB
実行使用メモリ 82,032 KB
最終ジャッジ日時 2023-10-25 04:17:44
合計ジャッジ時間 7,222 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 305 ms
81,640 KB
testcase_01 AC 105 ms
81,004 KB
testcase_02 AC 420 ms
81,656 KB
testcase_03 AC 467 ms
81,664 KB
testcase_04 AC 426 ms
81,652 KB
testcase_05 AC 437 ms
81,648 KB
testcase_06 AC 348 ms
81,824 KB
testcase_07 AC 217 ms
81,636 KB
testcase_08 AC 401 ms
81,640 KB
testcase_09 AC 328 ms
81,648 KB
testcase_10 AC 427 ms
81,648 KB
testcase_11 AC 296 ms
81,644 KB
testcase_12 AC 398 ms
81,900 KB
testcase_13 AC 263 ms
81,640 KB
testcase_14 AC 45 ms
65,320 KB
testcase_15 AC 153 ms
82,032 KB
testcase_16 AC 159 ms
82,032 KB
testcase_17 AC 152 ms
81,784 KB
testcase_18 AC 152 ms
82,032 KB
testcase_19 AC 154 ms
82,032 KB
testcase_20 AC 43 ms
63,272 KB
testcase_21 AC 41 ms
63,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    fact = [1]*3001
    s = 1
    for i in range(1, 3001):
        s *= i
        fact[i] = s

    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(list(str(ans)))
        print(list(str(t)))
        print(n, r, n-r)
        """
        print("AC" if ans <= t else "ZETUBOU")


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