'commit'
This commit is contained in:
13
GESP/Mkx/20250322T1.cpp
Normal file
13
GESP/Mkx/20250322T1.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
int dfs(int n) {
|
||||
if (n == 1 || n == 2)
|
||||
return 1;
|
||||
return dfs(n - 1) + dfs(n - 2);
|
||||
}
|
||||
int main() {
|
||||
int n;
|
||||
cin >> n;
|
||||
cout << dfs(n);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user