Cod sursa(job #157968)

Utilizator tranzistorciceo sebi tranzistor Data 13 martie 2008 13:17:39
Problema Nunta Scor 60
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.41 kb
#include <fstream>

using namespace std;

ifstream fin("nunta.in");
ofstream fout("nunta.out");

int main()
{
    long long unsigned a,b,n,m,i;
    fin>>n;
   
   
    
    
                     a=1;
                     b=2;
    for(i=3;i<=n;i++)
    {
                     m=a+b;
                     a=b;
                     b=m;
   
}
     fout<<m<<" "; 
   
    
    
    return 0;
}