59902023-10-11 16:16:43KCsengeToronyépítés (1,1,3,3)cpp14Wrong answer 18/508ms11328 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,o;
    cin>>n;
    int tomb[n+1];
    tomb[1]=2;
    tomb[2]=4;
    tomb[3]=10;

    for(int i=4;i<=n;i++)
    {
        tomb[i]=2*tomb[i-1]+2*tomb[i-3]%20210108;
    }
    cout<<tomb[n];
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base18/50
1Accepted0/03ms1876 KiB
2Wrong answer0/02ms2128 KiB
3Accepted3/33ms2332 KiB
4Accepted3/32ms2524 KiB
5Wrong answer0/42ms2736 KiB
6Wrong answer0/43ms2948 KiB
7Wrong answer0/48ms11028 KiB
8Wrong answer0/43ms4452 KiB
9Accepted4/42ms3424 KiB
10Accepted4/43ms3664 KiB
11Wrong answer0/43ms5228 KiB
12Wrong answer0/48ms11328 KiB
13Wrong answer0/47ms10508 KiB
14Wrong answer0/44ms6324 KiB
15Accepted2/22ms3820 KiB
16Accepted2/22ms3824 KiB