111242024-07-07 11:48:58probaLudak Harcapython3Runtime error 0/10054ms14464 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=' ')

SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2916 KiB
2Accepted17ms2916 KiB
subtask20/25
3Runtime error18ms2936 KiB
4Runtime error18ms2916 KiB
5Runtime error18ms3088 KiB
6Runtime error20ms3172 KiB
7Runtime error41ms4844 KiB
subtask30/40
8Runtime error18ms3044 KiB
9Runtime error19ms3176 KiB
10Runtime error20ms3860 KiB
11Runtime error25ms4372 KiB
12Runtime error32ms5756 KiB
13Runtime error39ms8032 KiB
14Runtime error48ms9456 KiB
15Runtime error52ms10496 KiB
subtask40/35
16Runtime error21ms3304 KiB
17Runtime error24ms4392 KiB
18Runtime error28ms6252 KiB
19Runtime error32ms7460 KiB
20Runtime error35ms6780 KiB
21Runtime error41ms9732 KiB
22Runtime error45ms11584 KiB
23Runtime error46ms12132 KiB
24Runtime error48ms9540 KiB
25Runtime error54ms14464 KiB