112902024-08-04 10:06:57probaLudak Harcapython3Runtime error 0/10046ms14348 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))
    
    
    
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2960 KiB
2Accepted17ms2916 KiB
subtask20/25
3Runtime error17ms3188 KiB
4Runtime error17ms2916 KiB
5Runtime error17ms2968 KiB
6Runtime error19ms3308 KiB
7Runtime error34ms4884 KiB
subtask30/40
8Runtime error18ms3084 KiB
9Runtime error18ms3208 KiB
10Runtime error20ms3784 KiB
11Runtime error23ms4396 KiB
12Runtime error28ms5976 KiB
13Runtime error35ms8064 KiB
14Runtime error39ms9540 KiB
15Runtime error43ms10756 KiB
subtask40/35
16Runtime error19ms3364 KiB
17Runtime error21ms4396 KiB
18Runtime error27ms6236 KiB
19Runtime error28ms7340 KiB
20Runtime error30ms6532 KiB
21Runtime error35ms9568 KiB
22Runtime error37ms11152 KiB
23Runtime error39ms12136 KiB
24Runtime error39ms9472 KiB
25Runtime error46ms14348 KiB