40282023-03-09 12:22:3713Járdakövezés háromféle elemmelcpp17Wrong answer 0/303ms4640 KiB
#include <bits/stdc++.h>
using namespace std;
main()
{
    int n;
    cin>>n;
    int t[n+1];
    t[1]=2;
    t[2]=11;
    for (int i=3;i<=n;i++)
    {
        t[i]=2*t[i-1]+7*t[i-2];
    }
    cout<<t[n]<<endl;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/03ms1876 KiB
2Wrong answer0/03ms2120 KiB
3Wrong answer0/23ms2328 KiB
4Wrong answer0/23ms2584 KiB
5Wrong answer0/23ms2816 KiB
6Wrong answer0/22ms2864 KiB
7Wrong answer0/23ms3148 KiB
8Wrong answer0/22ms3060 KiB
9Wrong answer0/23ms3408 KiB
10Wrong answer0/23ms3520 KiB
11Wrong answer0/23ms4028 KiB
12Wrong answer0/33ms4148 KiB
13Wrong answer0/32ms3588 KiB
14Wrong answer0/33ms3860 KiB
15Wrong answer0/33ms4640 KiB