111232024-07-07 11:45:33probaLudak Harcapython3Runtime error 0/10054ms14444 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(' ')]
a = []
for i in range(1, 7):
    p, lep = 0, 1
    try:
        while p < n:
            p += i+tabla[p+i]
            if p < n:
                lep += 1
    except:
        pass
    
    print(lep, end=' ')

SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2916 KiB
2Accepted17ms2916 KiB
subtask20/25
3Runtime error18ms2916 KiB
4Runtime error17ms2916 KiB
5Runtime error17ms2920 KiB
6Runtime error20ms3172 KiB
7Runtime error39ms4900 KiB
subtask30/40
8Runtime error17ms2916 KiB
9Runtime error18ms3196 KiB
10Runtime error20ms3676 KiB
11Runtime error25ms4520 KiB
12Runtime error30ms5756 KiB
13Runtime error41ms8180 KiB
14Runtime error50ms9568 KiB
15Runtime error52ms10476 KiB
subtask40/35
16Runtime error21ms3448 KiB
17Runtime error25ms4568 KiB
18Runtime error28ms6236 KiB
19Runtime error30ms7504 KiB
20Runtime error34ms6428 KiB
21Runtime error41ms9988 KiB
22Runtime error43ms11320 KiB
23Runtime error45ms12132 KiB
24Runtime error46ms9416 KiB
25Runtime error54ms14444 KiB