結果

問題 No.3633 Rabbit and turtle
コンテスト
ユーザー p-adic
提出日時 2026-08-21 22:22:58
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 290 ms / 2,000 ms
+ 527µs
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 235 ms
コンパイル使用メモリ 95,724 KB
実行使用メモリ 90,320 KB
最終ジャッジ日時 2026-08-21 22:23:06
合計ジャッジ時間 5,254 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:4: SyntaxWarning: invalid decimal literal
  for t in[0]*sum(J()):A,B,D,R=J();l=D*R;s=l//D;t=s+l//R;d=s*A-t*B;r=pow(10,100,t);s=(r*B+A-1)//A;t=s+((s-1)*D+R-1)//R;print(U if d>0else K if d else K if r<t else U if s*A>r*B else"tie")

ソースコード

diff #
raw source code

J=lambda:map(int,input().split())
U="rabbit"
K="turtle"
for t in[0]*sum(J()):A,B,D,R=J();l=D*R;s=l//D;t=s+l//R;d=s*A-t*B;r=pow(10,100,t);s=(r*B+A-1)//A;t=s+((s-1)*D+R-1)//R;print(U if d>0else K if d else K if r<t else U if s*A>r*B else"tie")
0