Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86250 Kevin 12序列的第n项 C++ Accepted 1 MS 272 KB 189 2024-07-23 21:45:15

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int a(int n){ if(n==1){ return 1; } else{ return a(n-1)+(n-2); } } int main(){ int n; cin>>n; cout<<a(n); return 0; }