97302024-03-04 15:21:48TimiJárda-L (40)cpp17Wrong answer 2/403ms4044 KiB
#include <iostream>

using namespace std;

int main()
{
     int n;
    cin>>n;
    long long int d[n+1];
    d[1]=1;
    d[2]=2;
    d[3]=5;
    for (int i=4; i<=n; i++)
        d[i]=d[i-1]+d[i-2]+2*d[i-3];

    cout<<d[n]<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base2/40
1Accepted0/03ms1752 KiB
2Wrong answer0/03ms1988 KiB
3Runtime error0/23ms2232 KiB
4Accepted2/23ms2612 KiB
5Wrong answer0/23ms2608 KiB
6Wrong answer0/23ms2608 KiB
7Wrong answer0/23ms2620 KiB
8Wrong answer0/33ms2832 KiB
9Wrong answer0/33ms3028 KiB
10Wrong answer0/33ms3120 KiB
11Wrong answer0/33ms3292 KiB
12Wrong answer0/33ms3260 KiB
13Wrong answer0/33ms3388 KiB
14Wrong answer0/33ms3748 KiB
15Wrong answer0/32ms3752 KiB
16Wrong answer0/33ms3952 KiB
17Wrong answer0/33ms4044 KiB