結果

問題 No.3545 Robot on Torus (Python)
コンテスト
ユーザー titia
提出日時 2026-05-18 03:42:16
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 345 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 244 ms
コンパイル使用メモリ 85,888 KB
実行使用メモリ 70,272 KB
スコア 292
最終ジャッジ日時 2026-05-18 03:42:27
合計ジャッジ時間 7,158 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

H,W=list(map(int,input().split()))
MAP=[input().strip() for i in range(H)]
for i in range(H):
    for j in range(W):
        if MAP[i][j]=="R":
            x=i
            y=j
for tests in range(10**6):
    if MAP[(x+1)%H][(y+1)%W]!="#":
        x=(x+1)%H
        y=(y+1)%W
    else:
        print(x+1,y+1)
        break
else:
    print("loop")
0