Cod sursa(job #1462088)

Utilizator bent_larsenSturzu Antonio-Gabriel bent_larsen Data 17 iulie 2015 01:02:43
Problema Nunta Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include<cstdio>
using namespace std;

long long f0 = 1, f1 = 1;
int n;

int main()
{
	freopen("nunta.in","r",stdin);
    freopen("nunta.out","w",stdout);

	scanf("%d",&n);
	for(int i = 2;i <= n;++i)
	{
		f1 = f1 + f0;
		f0 = f1 - f0;
	}
	
	printf("%lld\n",f1);
	
	return 0;
}