| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75104 | sh25_ganzy | 求1+2+3+... | C++ | 通过 | 0 MS | 244 KB | 209 | 2025-12-05 15:18:11 |
#include<bits/stdc++.h> using namespace std; int s(int n){ if(n==1){ return 1; }else{ return s(n-1)+n; } } int main(){ int n; cin>>n; cout<<s(n); return 0; }