結果
問題 |
No.250 atetubouのzetubou
|
ユーザー |
|
提出日時 | 2025-02-13 18:04:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,125 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 82,396 KB |
実行使用メモリ | 77,764 KB |
最終ジャッジ日時 | 2025-02-13 18:04:38 |
合計ジャッジ時間 | 3,830 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 WA * 19 |
ソースコード
import sys import math import bisect from heapq import heapify, heappop, heappush from collections import deque, defaultdict, Counter from functools import lru_cache from itertools import accumulate, combinations, permutations, product sys.set_int_max_str_digits(10 ** 6) sys.setrecursionlimit(1000000) MOD = 10 ** 9 + 7 MOD99 = 998244353 input = lambda: sys.stdin.readline().strip() NI = lambda: int(input()) NMI = lambda: map(int, input().split()) NLI = lambda: list(NMI()) SI = lambda: input() SMI = lambda: input().split() SLI = lambda: list(SMI()) EI = lambda m: [NLI() for _ in range(m)] def main(): Q = NI() for _ in range(Q): d, x, t = NMI() if d == 1: print("AC" if t >= 1 else "ZETUBOU") continue # x+d-1 C d-1 n = x+d-1 r = d-1 ans = 1 ng = False for i in range(r): ans *= n-i ans //= i+1 if ans > t: ng = True break # print(d, x, t, ans) print("AC" if ans <= t and not ng else "ZETUBOU") if __name__ == "__main__": main()