Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37304 | zhouhuanyu 玙静 | 斐波那契数列 | C++ | Accepted | 0 MS | 244 KB | 194 | 2024-01-20 09:41:32 |
#include <bits/stdc++.h> using namespace std; int re(int n){ if(n == 1){ return 0; } return re(n - 1) + (n - 2); } int main(){ int n; cin >> n; cout << re(n); return 0; }