結果
| 問題 | No.3545 Robot on Torus (Python) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-17 15:12:03 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 2,000 ms |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 77,312 KB |
| スコア | 356 |
| 最終ジャッジ日時 | 2026-05-17 15:12:09 |
| 合計ジャッジ時間 | 5,643 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
H,W=map(int,input().split());S=[input()for _ in range(H)];I=J=-1
for i in range(H*W):
if S[i//W][i%W] == 'R':
I=i//W
J=i%W
v=[[0]*W for _ in range(H)]
f=0
while not v[I][J]:
v[I][J]=1
I=(I+1)%H
J=(J+1)%W
if S[I][J]=='#':
print((I-1)%H+1,(J-1)%W+1)
exit()
print("loop")