226192026-01-15 12:34:26FintaTihamerJárda-L (40)cpp17Wrong answer 0/401ms512 KiB
#include<iostream>
using namespace std;

int main()
{int n;
    cin>>n;
    if(n==1) cout<<1;
    if(n==2) cout<<2;
    int f1=5, f2=2;
    int f3=f1;
    for(int i=3; i<n; i++){
        f1=2*f3+f2;
        f2=f3;
        f3=f1;
    }
    cout<<f1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Accepted0/01ms508 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms348 KiB
11Wrong answer0/31ms356 KiB
12Wrong answer0/31ms316 KiB
13Wrong answer0/31ms316 KiB
14Wrong answer0/31ms380 KiB
15Wrong answer0/31ms512 KiB
16Wrong answer0/31ms316 KiB
17Wrong answer0/31ms316 KiB