| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 71663 | sh25_ganzy | 金币 | C++ | 通过 | 0 MS | 244 KB | 224 | 2025-10-26 18:53:54 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,d=0,m; cin>>n; while(d*(d+1)<=2*n){ d++; } d--; m=d*(d+1)*(2*d+1)/6+(d+1)*(n-d*(d+1)/2); cout<<m; return 0; }