1984 | 2022-12-12 21:25:18 | CodeBreakers | Ludak Harca | python3 | Accepted 100/100 | 122ms | 36636 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))
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11276 KiB | ||||
2 | Accepted | 17ms | 11428 KiB | ||||
subtask2 | 25/25 | ||||||
3 | Accepted | 17ms | 11528 KiB | ||||
4 | Accepted | 17ms | 11936 KiB | ||||
5 | Accepted | 17ms | 11592 KiB | ||||
6 | Accepted | 28ms | 12428 KiB | ||||
7 | Accepted | 122ms | 15996 KiB | ||||
subtask3 | 40/40 | ||||||
8 | Accepted | 17ms | 12444 KiB | ||||
9 | Accepted | 17ms | 12748 KiB | ||||
10 | Accepted | 18ms | 13928 KiB | ||||
11 | Accepted | 21ms | 15408 KiB | ||||
12 | Accepted | 27ms | 18356 KiB | ||||
13 | Accepted | 32ms | 22748 KiB | ||||
14 | Accepted | 37ms | 25544 KiB | ||||
15 | Accepted | 41ms | 27072 KiB | ||||
subtask4 | 35/35 | ||||||
16 | Accepted | 32ms | 13400 KiB | ||||
17 | Accepted | 21ms | 15872 KiB | ||||
18 | Accepted | 25ms | 19492 KiB | ||||
19 | Accepted | 28ms | 22220 KiB | ||||
20 | Accepted | 29ms | 20672 KiB | ||||
21 | Accepted | 34ms | 27040 KiB | ||||
22 | Accepted | 35ms | 29976 KiB | ||||
23 | Accepted | 37ms | 31836 KiB | ||||
24 | Accepted | 39ms | 26800 KiB | ||||
25 | Accepted | 46ms | 36636 KiB |