結果

問題 No.3633 Rabbit and turtle
コンテスト
ユーザー あるふぁ
提出日時 2026-08-22 11:46:17
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 324 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 311 ms
コンパイル使用メモリ 21,540 KB
実行使用メモリ 15,996 KB
最終ジャッジ日時 2026-08-22 11:46:23
合計ジャッジ時間 5,340 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

T = int(input())
N = 10**100

for _ in range(T):
    A, B, D, R = map(int, input().split())
    wait = (D+R-1)//R
    cycle = wait+1
    runs = (N-1)//cycle+1
    rabbit = A*runs
    turtle = B*N
    if rabbit > turtle:
        print("rabbit")
    elif rabbit < turtle:
        print("turtle")
    else:
        print("tie")
0