8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f3f9f1 + 5de993f commit d33255fCopy full SHA for d33255f
0x10/solutions/2193.cpp
@@ -1,11 +1,23 @@
1
-// Authored by : BaaaaaaaaaaarkingDog
+// Authored by : Hot6Mania
2
// Co-authored by : -
3
-// http://boj.kr/****************
+// http://boj.kr/62b94c1ad9254f87a1f6e37323f2c5bf
4
#include <bits/stdc++.h>
5
using namespace std;
6
7
+typedef long long ll;
8
+
9
+int n;
10
+ll d[100][2];
11
12
int main(void){
13
ios::sync_with_stdio(0);
14
cin.tie(0);
15
-}
16
+ cin >> n;
17
+ d[1][1] = 1LL;
18
+ for(int i = 2; i <= n; ++i){
19
+ d[i][0] = d[i-1][0] + d[i-1][1];
20
+ d[i][1] = d[i-1][0];
21
+ }
22
+ cout << d[n][0] + d[n][1];
23
+}
0 commit comments