19842022-12-12 21:25:18CodeBreakersLudak Harcapython3Accepted 100/100122ms36636 KiB
n = int(input()) #mező
kapu = list(map(int, input().split()))
ko = [1, 2, 3, 4, 5, 6]
veg = []
for i in ko:
    j = 0
    c = 0
    while len(kapu) > j:
        if kapu[j] == 0: 
            j += i
            c += 1
        else:
            j += kapu[j]
    veg.append(c)

print(" ".join(str(i) for i in veg))
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms11276 KiB
2Accepted17ms11428 KiB
subtask225/25
3Accepted17ms11528 KiB
4Accepted17ms11936 KiB
5Accepted17ms11592 KiB
6Accepted28ms12428 KiB
7Accepted122ms15996 KiB
subtask340/40
8Accepted17ms12444 KiB
9Accepted17ms12748 KiB
10Accepted18ms13928 KiB
11Accepted21ms15408 KiB
12Accepted27ms18356 KiB
13Accepted32ms22748 KiB
14Accepted37ms25544 KiB
15Accepted41ms27072 KiB
subtask435/35
16Accepted32ms13400 KiB
17Accepted21ms15872 KiB
18Accepted25ms19492 KiB
19Accepted28ms22220 KiB
20Accepted29ms20672 KiB
21Accepted34ms27040 KiB
22Accepted35ms29976 KiB
23Accepted37ms31836 KiB
24Accepted39ms26800 KiB
25Accepted46ms36636 KiB