117892024-11-10 19:19:38MLudak Harcapython3Wrong answer 65/100150ms13772 KiB
from sys import stdin, stdout

N = int(input(""))
J = list(map(int, stdin.readline().split()))

position = 0
step = 0
rolls = []

for i in range(6):
    while position < N:
        position += i+1
        if position < N:
            position += J[position]
        step += 1
    print(step, end=" ")
    step = 0
    position = 0
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted16ms2872 KiB
2Accepted14ms2872 KiB
subtask225/25
3Accepted14ms3096 KiB
4Accepted16ms2872 KiB
5Accepted17ms2876 KiB
6Accepted28ms3088 KiB
7Accepted150ms4936 KiB
subtask340/40
8Accepted17ms2872 KiB
9Accepted17ms3124 KiB
10Accepted17ms3632 KiB
11Accepted21ms4408 KiB
12Accepted27ms5892 KiB
13Accepted37ms8152 KiB
14Accepted41ms9456 KiB
15Accepted41ms10176 KiB
subtask40/35
16Accepted32ms3388 KiB
17Accepted21ms4508 KiB
18Wrong answer26ms6320 KiB
19Wrong answer27ms7240 KiB
20Accepted30ms6564 KiB
21Wrong answer35ms9696 KiB
22Wrong answer35ms10904 KiB
23Wrong answer37ms11664 KiB
24Accepted37ms9596 KiB
25Wrong answer46ms13772 KiB