Cod sursa(job #356528)
Utilizator | Data | 14 octombrie 2009 23:58:45 | |
---|---|---|---|
Problema | Nunta | Scor | 0 |
Compilator | cpp | Status | done |
Runda | CNRV #2 | Marime | 0.29 kb |
#include <fstream>
#include <iostream>
using namespace std;
int main () {
long long n,a,b,c;
ifstream f("nunta.in");
ofstream g("nunta.out");
f>>n;
or (i=3;i<=n+1;i++) {
c=a+b;
a=b;
b=c;
}
cout<<b;
f.close();
g.close();
return 0;
}