結果
| 問題 |
No.1868 Teleporting Cyanmond
|
| コンテスト | |
| ユーザー |
AEn
|
| 提出日時 | 2022-05-12 12:58:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 178 bytes |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 80,000 KB |
| 最終ジャッジ日時 | 2024-07-20 06:14:43 |
| 合計ジャッジ時間 | 3,444 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 25 |
ソースコード
N = int(input())
R = list(map(int, input().split()))
posi, res = 0, 0
for i in range(N):
if posi == N-1:
print(res)
exit()
res += 1
posi = R[posi]-1
AEn