結果

問題 No.1868 Teleporting Cyanmond
ユーザー shinichi
提出日時 2022-03-11 22:16:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 123 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 79,744 KB
最終ジャッジ日時 2024-09-16 02:35:36
合計ジャッジ時間 3,195 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
R = list(map(int, input().split()))

now = 1
c = 0
while now != N:
    now = R[now-1]
    c += 1

print(c)
0