Cod sursa(job #1275233)
| Utilizator | Data | 24 noiembrie 2014 21:33:59 | |
|---|---|---|---|
| Problema | Nunta | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.31 kb |
#include <cstdio>
using namespace std;
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;
}
