Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
314093 tc242204朱乙毛 NOIP2015 普及:第一题 金币 C++ 通过 100 0 MS 280 KB 203 2024-12-12 16:39:25

Tests(10/10):


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


测评信息: