| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 27994 | 202102bxy | 金币 | C++ | Accepted | 100 | 0 MS | 248 KB | 238 | 2021-12-22 21:29:06 |
#include<bits/stdc++.h> using namespace std; int n,a,ans; int main(){ cin>>n; for(int i=1;;i++){ for(int j=1;j<=i;j++){ ans+=i; a++; if(a==n){ cout<<ans; return 0; } } } cout<<ans; return 0; }