123982024-12-16 15:01:30mártonágnesToronyépítés (1,1,3,3)cpp17Wrong answer 18/504ms4216 KiB
#include <iostream>

using namespace std;

int main()
{
    int N;
    cin >> N;
    int a[N];
    a[1]=2;
    a[2]=4;
    a[3]=10;
    for (int i=4; i<=N; i++)
    {
        a[i]=2*a[i-1]+2*a[i-3];
    }
    cout << a[N]%20210108;


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base18/50
1Accepted0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms508 KiB
5Wrong answer0/41ms320 KiB
6Wrong answer0/41ms320 KiB
7Wrong answer0/44ms4216 KiB
8Wrong answer0/41ms720 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms320 KiB
11Wrong answer0/42ms1080 KiB
12Wrong answer0/44ms4152 KiB
13Wrong answer0/44ms3640 KiB
14Wrong answer0/42ms1772 KiB
15Accepted2/21ms320 KiB
16Accepted2/21ms516 KiB