23282023-01-10 15:04:27neszbalLudak Harcapython3Accepted 100/100111ms36236 KiB
N = int(input())

hely = 0
szamlalo = 0

tabla = list(map(int, input().split())) 

for i in range(1, 7):
    szamlalo = 0
    hely = 0
    while hely < N:
        szamlalo += 1
        hely += i
        try:
            while tabla[hely] != 0:
                hely += tabla[hely]
        except:
            break
    print(szamlalo, end=" ")
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted18ms11072 KiB
2Accepted17ms11420 KiB
subtask225/25
3Accepted16ms11780 KiB
4Accepted17ms11792 KiB
5Accepted17ms11892 KiB
6Accepted26ms12580 KiB
7Accepted111ms15852 KiB
subtask340/40
8Accepted17ms12408 KiB
9Accepted17ms12540 KiB
10Accepted18ms14072 KiB
11Accepted21ms14936 KiB
12Accepted27ms18124 KiB
13Accepted34ms22556 KiB
14Accepted39ms25480 KiB
15Accepted41ms27304 KiB
subtask435/35
16Accepted29ms13200 KiB
17Accepted21ms15516 KiB
18Accepted26ms19180 KiB
19Accepted28ms21828 KiB
20Accepted28ms20224 KiB
21Accepted34ms26412 KiB
22Accepted37ms29496 KiB
23Accepted41ms31136 KiB
24Accepted39ms26596 KiB
25Accepted43ms36236 KiB