結果
| 問題 | No.3633 Rabbit and turtle |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-08-21 21:44:50 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 255 ms |
| コンパイル使用メモリ | 96,360 KB |
| 実行使用メモリ | 84,992 KB |
| 最終ジャッジ日時 | 2026-08-21 21:44:58 |
| 合計ジャッジ時間 | 3,237 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 13 |
ソースコード
from sys import stdin
input = stdin.readline
from math import lcm
n = 10**100
for _ in range(int(input())):
A, B, D, R = map(int, input().split())
LCM = lcm(D, R)
C = LCM//D+LCM//R
A *= LCM//D
if B*C < A:
print("rabbit")
elif B*C > A:
print("turtle")
else:
print("tie" if n%C == 0 else "rabbit")
detteiuu