結果
| 問題 | No.3545 Robot on Torus (Python) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-16 23:57:23 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 2,000 ms |
| コード長 | 194 bytes |
| 記録 | |
| コンパイル時間 | 328 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 84,608 KB |
| スコア | 443 |
| 最終ジャッジ日時 | 2026-05-16 23:57:32 |
| 合計ジャッジ時間 | 6,862 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
h,w,*s=open(0).read().split();q=2e6;h=int(h);w=int(w)
for c in s:
if'R'in c:y=c.index('R');x=s.index(c)
while q*(s[x][y]!='#'):x=(x+1)%h;y=(y+1)%w;q-=1
print(q and f"{x or h} {y or w}"or"loop")