21212022-12-21 08:19:26TimiLudak Harcacpp11Runtime error 0/10030ms5164 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, i, lepes=0;
    cin>>n;
    int a[n];
    for (i=0; i<n; i++)
    {
        cin>>a[i];
    }
    for (int j=1; j<=6; j++)
    {
        lepes=0;
        i=0;
        while (i<n)
        {

                lepes++;
                i=i+j;
                  i=i+a[i];

        }
        cout<<lepes<<" ";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Runtime error3ms1976 KiB
2Runtime error3ms2172 KiB
subtask20/25
3Accepted2ms2268 KiB
4Runtime error2ms2452 KiB
5Runtime error3ms2720 KiB
6Accepted4ms2860 KiB
7Runtime error19ms3640 KiB
subtask30/40
8Accepted2ms3196 KiB
9Runtime error3ms3268 KiB
10Accepted4ms3288 KiB
11Accepted7ms3612 KiB
12Runtime error12ms4088 KiB
13Accepted18ms4300 KiB
14Runtime error25ms4576 KiB
15Accepted27ms4584 KiB
subtask40/35
16Accepted4ms3868 KiB
17Accepted7ms4144 KiB
18Wrong answer9ms4124 KiB
19Runtime error13ms4552 KiB
20Accepted14ms4476 KiB
21Wrong answer18ms4512 KiB
22Wrong answer21ms4816 KiB
23Runtime error25ms5028 KiB
24Runtime error25ms5164 KiB
25Runtime error30ms5104 KiB