Cod sursa(job #1462090)
| Utilizator | Data | 17 iulie 2015 01:08:44 | |
|---|---|---|---|
| Problema | Nunta | Scor | 0 |
| Compilator | c | Status | done |
| Runda | Arhiva de probleme | Marime | 0.27 kb |
#include<stdio.h>
long long f0 = 1, f1 = 1;
int n, i;
int main()
{
freopen("nunta.in","r",stdin);
freopen("nunta.out","w",stdout);
scanf("%d",&n);
for(i = 2;i <= n;++i)
{
f1 = f1 + f0;
f0 = f1 - f0;
}
printf("%lld\n",f1);
return 0;
}
