123962024-12-16 14:49:43ruffbrigiToronyépítés (1,1,3,3)cpp17Wrong answer 43/507ms508 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,f1=2,f2=4,f3=10,f4;
    cin>>n;
    for(int i=4;i<=n;i++)
    {
        f4=(2*f3+2*f1)%20210108;
        f1=f2;
        f2=f3;
        f3=f4;
    }
    cout<<f4;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base43/50
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Wrong answer0/31ms320 KiB
5Accepted4/41ms320 KiB
6Accepted4/41ms508 KiB
7Accepted4/47ms508 KiB
8Accepted4/42ms404 KiB
9Accepted4/41ms320 KiB
10Accepted4/41ms500 KiB
11Accepted4/42ms320 KiB
12Accepted4/46ms404 KiB
13Accepted4/46ms332 KiB
14Accepted4/43ms320 KiB
15Wrong answer0/21ms320 KiB
16Wrong answer0/21ms508 KiB