Cod sursa(job #1348908)
Utilizator | Data | 19 februarie 2015 21:43:10 | |
---|---|---|---|
Problema | Nunta | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include <cstdio>
int N;
int main(){
freopen("nunta.in","r",stdin);
freopen("nunta.out","w",stdout);
scanf("%d",&N);
long long f=1,l=2,aux; N-=2;
while((N--)!=0){
aux=l;
l=l+f;
f=aux;
}
printf("%I64d\n",l);
return 0;
}