| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 74652 | sh25_shenpy | 求1+2+3+... | C++ | 通过 | 0 MS | 240 KB | 225 | 2025-11-30 13:45:29 |
#include<bits/stdc++.h> using namespace std; int f(int n) { if(n==1){ return 1; } else{ return f(n-1)+n; } } int main() { int n; cin>>n; cout<<f(n); return 0; }