9742022-02-07 20:12:57HobimmToronyépítés (80 pont)cpp11Wrong answer 31/809ms17604 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]%20210108;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base31/80
1Accepted0/01ms1864 KiB
2Wrong answer0/01ms1916 KiB
3Accepted4/41ms1968 KiB
4Accepted4/41ms1980 KiB
5Wrong answer0/51ms1976 KiB
6Accepted5/51ms1984 KiB
7Wrong answer0/69ms17604 KiB
8Wrong answer0/62ms3848 KiB
9Accepted7/71ms1996 KiB
10Accepted7/71ms2004 KiB
11Wrong answer0/83ms5116 KiB
12Wrong answer0/88ms17400 KiB
13Wrong answer0/88ms15632 KiB
14Wrong answer0/84ms7200 KiB
15Accepted2/21ms2020 KiB
16Accepted2/21ms2024 KiB