結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 21:15:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 143 ms / 5,000 ms |
| コード長 | 807 bytes |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 82,900 KB |
| 実行使用メモリ | 79,380 KB |
| 最終ジャッジ日時 | 2025-03-20 21:16:05 |
| 合計ジャッジ時間 | 2,760 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
import sys
def main():
input = sys.stdin.read().split()
Q = int(input[0])
idx = 1
for _ in range(Q):
D = int(input[idx])
X = int(input[idx+1])
T = int(input[idx+2])
idx +=3
d = D -1
if d == 0:
if 1 <= T:
print("AC")
else:
print("ZETUBOU")
continue
res = 1
ok = True
for i in range(1, d+1):
numerator = X + i
temp = res * numerator
res_new = temp // i
if res_new > T:
ok = False
break
res = res_new
if ok and res <= T:
print("AC")
else:
print("ZETUBOU")
if __name__ == "__main__":
main()
lam6er