11124 | 2024-07-07 11:48:58 | proba | Ludak Harca | python3 | Runtime error 0/100 | 54ms | 14464 KiB |
# ludak
#2 2 2 1 2 1
n = int(input())
#n = 6
tabla = [int(i) for i in input().split(' ')]
#tabla = [int(i) for i in '0 2 3 0 4 0'.split(' ')]
for i in range(1, 7):
p, lep = 0, 1
try:
while p < n:
p += i
p += tabla[p]
if p < n:
lep += 1
except:
pass
print(lep, end=' ')
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 2916 KiB | ||||
2 | Accepted | 17ms | 2916 KiB | ||||
subtask2 | 0/25 | ||||||
3 | Runtime error | 18ms | 2936 KiB | ||||
4 | Runtime error | 18ms | 2916 KiB | ||||
5 | Runtime error | 18ms | 3088 KiB | ||||
6 | Runtime error | 20ms | 3172 KiB | ||||
7 | Runtime error | 41ms | 4844 KiB | ||||
subtask3 | 0/40 | ||||||
8 | Runtime error | 18ms | 3044 KiB | ||||
9 | Runtime error | 19ms | 3176 KiB | ||||
10 | Runtime error | 20ms | 3860 KiB | ||||
11 | Runtime error | 25ms | 4372 KiB | ||||
12 | Runtime error | 32ms | 5756 KiB | ||||
13 | Runtime error | 39ms | 8032 KiB | ||||
14 | Runtime error | 48ms | 9456 KiB | ||||
15 | Runtime error | 52ms | 10496 KiB | ||||
subtask4 | 0/35 | ||||||
16 | Runtime error | 21ms | 3304 KiB | ||||
17 | Runtime error | 24ms | 4392 KiB | ||||
18 | Runtime error | 28ms | 6252 KiB | ||||
19 | Runtime error | 32ms | 7460 KiB | ||||
20 | Runtime error | 35ms | 6780 KiB | ||||
21 | Runtime error | 41ms | 9732 KiB | ||||
22 | Runtime error | 45ms | 11584 KiB | ||||
23 | Runtime error | 46ms | 12132 KiB | ||||
24 | Runtime error | 48ms | 9540 KiB | ||||
25 | Runtime error | 54ms | 14464 KiB |