結果

問題 No.250 atetubouのzetubou
ユーザー nanaenanae
提出日時 2017-04-05 15:45:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 3,004 ms / 5,000 ms
コード長 354 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 8,472 KB
最終ジャッジ日時 2023-09-22 20:09:08
合計ジャッジ時間 35,588 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,724 ms
8,344 KB
testcase_01 AC 309 ms
8,372 KB
testcase_02 AC 2,643 ms
7,996 KB
testcase_03 AC 3,004 ms
8,472 KB
testcase_04 AC 2,624 ms
8,268 KB
testcase_05 AC 2,710 ms
8,360 KB
testcase_06 AC 2,094 ms
8,360 KB
testcase_07 AC 1,019 ms
8,308 KB
testcase_08 AC 2,472 ms
8,312 KB
testcase_09 AC 1,878 ms
8,224 KB
testcase_10 AC 2,680 ms
8,428 KB
testcase_11 AC 1,611 ms
8,308 KB
testcase_12 AC 2,441 ms
8,308 KB
testcase_13 AC 1,351 ms
8,016 KB
testcase_14 AC 29 ms
8,064 KB
testcase_15 AC 706 ms
8,464 KB
testcase_16 AC 709 ms
8,460 KB
testcase_17 AC 706 ms
8,280 KB
testcase_18 AC 706 ms
8,300 KB
testcase_19 AC 708 ms
8,452 KB
testcase_20 AC 16 ms
8,056 KB
testcase_21 AC 16 ms
7,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial

def solve():
    Q = int(input())

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

def binom(n, k):
    return factorial(n) // factorial(k) // factorial(n - k)

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