32222023-02-22 18:15:19baranyimarcellToronyépítés (80 pont)cpp17Wrong answer 6/806ms11204 KiB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int N, i, j, ossz;
    cin>>N;
    vector<int>ki(N);
    ki[0]=3;
    ki[1]=10;
    if (i>1)
    {
        for (i=2; i<N; i++)
        {
            ossz+=3*ki[i-1]+ki[i-2];
            ossz%=20210108;
            ki[i]=ossz;
        }
    }
    cout<<ki[N-1]<<endl;
}
SubtaskSumTestVerdictTimeMemory
base6/80
1Wrong answer0/03ms1812 KiB
2Wrong answer0/03ms2060 KiB
3Wrong answer0/43ms2264 KiB
4Accepted4/43ms2520 KiB
5Wrong answer0/52ms2564 KiB
6Wrong answer0/52ms2544 KiB
7Wrong answer0/66ms10468 KiB
8Wrong answer0/63ms3600 KiB
9Wrong answer0/73ms2956 KiB
10Wrong answer0/73ms3168 KiB
11Wrong answer0/83ms4752 KiB
12Wrong answer0/84ms11204 KiB
13Wrong answer0/84ms10168 KiB
14Wrong answer0/83ms6148 KiB
15Wrong answer0/23ms3760 KiB
16Accepted2/23ms3868 KiB