← Back to List

2193번: 이친수 ↗

Solutions

C++14
173 B | 173 chars
#include <iostream>
using namespace std;
long long int ar[110],N;
int main()
{
	cin>>N;
	ar[1]=1;
	ar[2]=1; 
	for(int x=3; x<=N; x++) ar[x]=ar[x-1]+ar[x-2];
	cout<<ar[N];
}