| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 75543 | sh25_shenpy | 求和 | C++ | Accepted | 0 MS | 240 KB | 235 | 2025-12-07 17:28:39 |
#include <bits/stdc++.h> using namespace std; int m(int n) { if(n==1) return 1; else return m(n-1)+n; } int main() { int n,sum=0; cin>>n; for(int i=1;i<=n;++i) { sum+=m(i); } cout<<sum; return 0; }