Cod sursa(job #1275226)
Utilizator | Data | 24 noiembrie 2014 21:26:27 | |
---|---|---|---|
Problema | Nunta | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <iostream>
#include <fstream>
#define LL unsigned long long int
using namespace std;
LL N,dp[90];
int main(){
ifstream in("nunta.in");
ofstream out("nunta.out");
in >> N;
LL i;
dp[1]=1,dp[2]=2;
for (i=3; i<=N; i++)
dp[i]=dp[i-1]+dp[i-2];
out << dp[N];
return 0;
}