結果

問題 No.250 atetubouのzetubou
ユーザー brthyyjpbrthyyjp
提出日時 2021-04-15 01:17:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,802 ms / 5,000 ms
コード長 457 bytes
コンパイル時間 758 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 79,792 KB
最終ジャッジ日時 2023-09-13 15:05:21
合計ジャッジ時間 21,009 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,058 ms
79,176 KB
testcase_01 AC 257 ms
76,692 KB
testcase_02 AC 1,588 ms
79,136 KB
testcase_03 AC 1,802 ms
79,732 KB
testcase_04 AC 1,629 ms
79,792 KB
testcase_05 AC 1,646 ms
79,764 KB
testcase_06 AC 1,286 ms
79,132 KB
testcase_07 AC 671 ms
78,444 KB
testcase_08 AC 1,476 ms
79,180 KB
testcase_09 AC 1,206 ms
79,124 KB
testcase_10 AC 1,606 ms
79,396 KB
testcase_11 AC 1,007 ms
78,300 KB
testcase_12 AC 1,489 ms
79,180 KB
testcase_13 AC 875 ms
78,656 KB
testcase_14 AC 86 ms
75,968 KB
testcase_15 AC 136 ms
77,816 KB
testcase_16 AC 135 ms
78,520 KB
testcase_17 AC 130 ms
77,776 KB
testcase_18 AC 134 ms
78,168 KB
testcase_19 AC 132 ms
77,796 KB
testcase_20 AC 71 ms
71,208 KB
testcase_21 AC 71 ms
71,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

def cmb(n, r):
    if r < 0 or r > n:
        return 0
    r = min(r, n-r)
    x = 1
    for i in range(n-r+1, n+1):
        x *= i
    y = 1
    for i in range(1, r+1):
        y *= i
    return x//y

q = int(input())
for _ in range(q):
    d, x, t = map(int, input().split())
    c = cmb(x+d-1, d-1)
    if c > t:
        print('ZETUBOU')
    else:
        print('AC')
0