11290 | 2024-08-04 10:06:57 | proba | Ludak Harca | python3 | Runtime error 0/100 | 46ms | 14348 KiB |
N = int(input())
'''
6
0 2 3 0 4 0
2 2 2 1 2 1'''
kapu = list(map(int, input().split(' ')))
'''
7
0 7 0 2 0 1 0
1 4 2 2 2 2'''
lista = []
for i in range(1, 7):
pos, lepes = 0, 0
while pos <= N - 1:
if pos+i <= N-1:
pos += i + kapu[pos+i]
else:
lepes += 1
break
lepes += 1
lista += [str(lepes)]
print(' '.join(lista))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 2960 KiB | ||||
2 | Accepted | 17ms | 2916 KiB | ||||
subtask2 | 0/25 | ||||||
3 | Runtime error | 17ms | 3188 KiB | ||||
4 | Runtime error | 17ms | 2916 KiB | ||||
5 | Runtime error | 17ms | 2968 KiB | ||||
6 | Runtime error | 19ms | 3308 KiB | ||||
7 | Runtime error | 34ms | 4884 KiB | ||||
subtask3 | 0/40 | ||||||
8 | Runtime error | 18ms | 3084 KiB | ||||
9 | Runtime error | 18ms | 3208 KiB | ||||
10 | Runtime error | 20ms | 3784 KiB | ||||
11 | Runtime error | 23ms | 4396 KiB | ||||
12 | Runtime error | 28ms | 5976 KiB | ||||
13 | Runtime error | 35ms | 8064 KiB | ||||
14 | Runtime error | 39ms | 9540 KiB | ||||
15 | Runtime error | 43ms | 10756 KiB | ||||
subtask4 | 0/35 | ||||||
16 | Runtime error | 19ms | 3364 KiB | ||||
17 | Runtime error | 21ms | 4396 KiB | ||||
18 | Runtime error | 27ms | 6236 KiB | ||||
19 | Runtime error | 28ms | 7340 KiB | ||||
20 | Runtime error | 30ms | 6532 KiB | ||||
21 | Runtime error | 35ms | 9568 KiB | ||||
22 | Runtime error | 37ms | 11152 KiB | ||||
23 | Runtime error | 39ms | 12136 KiB | ||||
24 | Runtime error | 39ms | 9472 KiB | ||||
25 | Runtime error | 46ms | 14348 KiB |