| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 27518 | 安一宸 | 金币 | C++ | Accepted | 100 | 0 MS | 252 KB | 208 | 2021-12-12 12:55:44 |
#include<bits/stdc++.h> using namespace std; int n,h,l=1,i,sum; int main(){ cin>>n; for(i=1;i<=n;i+=l){ sum+=l*(i-h); l++; h=i; } if(i!=n){ sum+=(n-h)*l; } cout<<sum; return 0; }