2352 | 2023-01-10 22:42:02 | kristof | Ludak Harca | python3 | Accepted 100/100 | 103ms | 36364 KiB |
N = int(input())
table = list(map(int, input().split()))
placeNow = 0
steps = 0
for i in range(1, 7):
placeNow = 0
steps = 0
while placeNow < N:
steps += 1
placeNow += i
try:
while table[placeNow] != 0:
placeNow += table[placeNow]
except:
break
print(steps, end=" ")
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 10868 KiB | ||||
2 | Accepted | 17ms | 11252 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 16ms | 11248 KiB | ||||
4 | Accepted | 16ms | 11596 KiB | ||||
5 | Accepted | 17ms | 11740 KiB | ||||
6 | Accepted | 25ms | 12064 KiB | ||||
7 | Accepted | 103ms | 15700 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 17ms | 12092 KiB | ||||
9 | Accepted | 17ms | 12648 KiB | ||||
10 | Accepted | 19ms | 14124 KiB | ||||
11 | Accepted | 21ms | 15400 KiB | ||||
12 | Accepted | 27ms | 18440 KiB | ||||
13 | Accepted | 32ms | 22744 KiB | ||||
14 | Accepted | 39ms | 26028 KiB | ||||
15 | Accepted | 43ms | 27924 KiB | ||||
subtask4 | 35/35 | ||||||
16 | Accepted | 29ms | 13672 KiB | ||||
17 | Accepted | 21ms | 16212 KiB | ||||
18 | Accepted | 25ms | 19444 KiB | ||||
19 | Accepted | 27ms | 21856 KiB | ||||
20 | Accepted | 29ms | 20620 KiB | ||||
21 | Accepted | 34ms | 26844 KiB | ||||
22 | Accepted | 37ms | 29832 KiB | ||||
23 | Accepted | 39ms | 31412 KiB | ||||
24 | Accepted | 39ms | 26404 KiB | ||||
25 | Accepted | 43ms | 36364 KiB |