Initial commit

This commit is contained in:
xixu-me committed 2024-03-17 22:30:49 +08:00
commit bdf71aef37
120 files changed
+8284

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#include <bits/stdc++.h>
using namespace std;
int fabonacci(int n);
int main(void) {
int n;
scanf("%d", &n);
printf("%d\n", fabonacci(n));
return 0;
}
int fabonacci(int n) {
int ret;
if (n == 0 || n == 1) {
ret = n;
}
else {
ret = fabonacci(n - 1) + fabonacci(n - 2);
}
return ret;
}