Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
390564 郭绍凡 NOIP2015 普及:第一题 金币 C++ 通过 100 0 MS 276 KB 225 2025-03-16 14:04:10

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int main(){ int n,a=1,b=1,sum=0; cin>>n; while(n--){ if(b==0){ ++a; b=a; } b--; sum+=a; } cout<<sum; return 0; }


测评信息: