Skip to content

Instantly share code, notes, and snippets.

@Baekjoon

Baekjoon/2193.cc Secret

Last active July 6, 2017 15:53
Show Gist options
  • Save Baekjoon/49b2bfd22be42707bb88 to your computer and use it in GitHub Desktop.
Save Baekjoon/49b2bfd22be42707bb88 to your computer and use it in GitHub Desktop.
2193
#include <iostream>
using namespace std;
long long d[91];
int main() {
int n;
cin >> n;
d[1] = 1;
d[2] = 1;
for (int i=3; i<=n; i++) {
d[i] = d[i-1] + d[i-2];
}
cout << d[n] << '\n';
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment