結果

問題 No.1868 Teleporting Cyanmond
ユーザー hirohito1971
提出日時 2022-03-21 15:43:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 156 bytes
コンパイル時間 799 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 73,344 KB
最終ジャッジ日時 2024-10-09 00:15:18
合計ジャッジ時間 3,237 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
R = [int(x)-1 for x in input().split()]
now =0
for i in range(1,N+1):
    now = R[now]
    if now == N-1:
        print(i)
        exit()

0