Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
75577 张韫礼 金币 C++ 通过 100 1 MS 252 KB 186 2026-07-04 15:47:37

Tests(10/10):


#include <bits/stdc++.h> using namespace std; int main(){ int n,f=0,cnt=0;;cin>>n; for(int i=1;n>=0;i++){ n=n-i; cnt+=i*i; f=i; } cout<<cnt+f*n; return 0; }


测评信息: