타일식 장애물

PHOTO EMBED

Sun Feb 25 2024 07:43:34 GMT+0000 (Coordinated Universal Time)

Saved by @hajinjang0714

#include <iostream>
using namespace std;
int main()
{
    long long cnt=1, bef=0,befbef=0, sum=1, a, b;
    cin>>a;
    while(sum!=a)
    {
        befbef=bef;
        bef=cnt;
        cnt=bef+befbef;
        sum++;
    }
    b=cnt+cnt+bef;
    cout<<b*2;
}
content_copyCOPY

https://www.acmicpc.net/submit/13301/72858658