| 记录编号 | 359363 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 2110.[NOIP 2015PJ]金币 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.003 s | ||
| 提交时间 | 2016-12-22 13:38:15 | 内存使用 | 0.31 MiB | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
ios::sync_with_stdio(false);
freopen("2015coin.in","r",stdin);
freopen("2015coin.out","w",stdout);
int n,d=0,d1=0,a=1,s=0;
cin>>n;
for(;;){
d++;d1++;
s+=a;
if(d1==a){
a++;
d1=0;
}
if(d==n)break;
}
cout<<s;
}