11791 | 2024-11-10 19:32:55 | M | Ludak Harca | python3 | Accepted 100/100 | 104ms | 13852 KiB |
from sys import stdin, stdout
N = int(input(""))
J = list(map(int, stdin.readline().split()))
position = 0
step = 0
rolls = []
for i in range(1, 7):
while position < N:
position += i
step += 1
try:
while J[position] != 0:
position += J[position]
except:
break
print(step, end=" ")
step = 0
position = 0
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3120 KiB | ||||
2 | Accepted | 16ms | 3116 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 16ms | 3128 KiB | ||||
4 | Accepted | 16ms | 2872 KiB | ||||
5 | Accepted | 17ms | 3128 KiB | ||||
6 | Accepted | 26ms | 3128 KiB | ||||
7 | Accepted | 104ms | 4904 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 17ms | 3128 KiB | ||||
9 | Accepted | 17ms | 3112 KiB | ||||
10 | Accepted | 18ms | 3780 KiB | ||||
11 | Accepted | 21ms | 4476 KiB | ||||
12 | Accepted | 26ms | 5800 KiB | ||||
13 | Accepted | 35ms | 8088 KiB | ||||
14 | Accepted | 41ms | 9472 KiB | ||||
15 | Accepted | 43ms | 10176 KiB | ||||
subtask4 | 35/35 | ||||||
16 | Accepted | 29ms | 3384 KiB | ||||
17 | Accepted | 20ms | 4356 KiB | ||||
18 | Accepted | 25ms | 6160 KiB | ||||
19 | Accepted | 28ms | 7228 KiB | ||||
20 | Accepted | 30ms | 6516 KiB | ||||
21 | Accepted | 34ms | 9828 KiB | ||||
22 | Accepted | 37ms | 10916 KiB | ||||
23 | Accepted | 41ms | 11944 KiB | ||||
24 | Accepted | 41ms | 9400 KiB | ||||
25 | Accepted | 48ms | 13852 KiB |