9712022-02-07 20:07:38HobimmToronyépítés (80 pont)cpp11Wrong answer 26/808ms17652 KiB
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    int n;
    cin >> n;
    long long int a[n];
    a[0]=3;
    a[1]=10;
    for (int i=2;i<n;i++) {
       a[i]=a[i-2]+a[i-1]*3;
    }
    cout << a[n-1];
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base26/80
1Accepted0/02ms1872 KiB
2Wrong answer0/01ms1964 KiB
3Accepted4/41ms2020 KiB
4Accepted4/41ms2020 KiB
5Wrong answer0/51ms2028 KiB
6Wrong answer0/51ms2028 KiB
7Wrong answer0/68ms17652 KiB
8Wrong answer0/62ms3896 KiB
9Accepted7/71ms2040 KiB
10Accepted7/71ms2052 KiB
11Wrong answer0/82ms5164 KiB
12Wrong answer0/88ms17444 KiB
13Wrong answer0/88ms15680 KiB
14Wrong answer0/84ms7252 KiB
15Accepted2/21ms2064 KiB
16Accepted2/21ms2076 KiB