結果
| 問題 | No.3545 Robot on Torus (Python) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-16 23:52:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 253 ms / 2,000 ms |
| コード長 | 195 bytes |
| 記録 | |
| コンパイル時間 | 476 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 298,880 KB |
| スコア | 442 |
| 最終ジャッジ日時 | 2026-05-16 23:52:22 |
| 合計ジャッジ時間 | 8,228 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
p=input;h,w=map(int,p().split());s="";q=2e6
for i in range(h):
t=p();s+=t
if'R'in t:y=t.index('R');x=i
while q*(s[x*w+y]!='#'):x=(x+1)%h;y=(y+1)%w;q-=1
print(q and f"{x or h} {y or w}"or"loop")