9732022-02-07 20:12:45HobimmToronyépítés (80 pont)cpp11Wrong answer 31/808ms17600 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/02ms1864 KiB
2Wrong answer0/01ms1924 KiB
3Accepted4/41ms1976 KiB
4Accepted4/41ms1976 KiB
5Wrong answer0/51ms1980 KiB
6Accepted5/51ms1980 KiB
7Wrong answer0/68ms17600 KiB
8Wrong answer0/62ms3852 KiB
9Accepted7/71ms1996 KiB
10Accepted7/71ms1996 KiB
11Wrong answer0/83ms5116 KiB
12Wrong answer0/88ms17400 KiB
13Wrong answer0/88ms15636 KiB
14Wrong answer0/83ms7204 KiB
15Accepted2/21ms2020 KiB
16Accepted2/21ms2020 KiB