| 比赛 | 防止浮躁的小练习v0.8 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 金币 | 最终得分 | 100 |
| 用户昵称 | ciyou | 运行时间 | 0.012 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2016-10-28 09:53:06 | ||
#include<iostream>
#include<cstdio>
using namespace std;
int n;
int main(){
freopen("2015coin.in","r",stdin);
freopen("2015coin.out","w",stdout);
cin>>n;
int t=1,now=1,ans=0;
while(n>0){
ans+=now;
t--;
if(t==0){
now++;
t=now;
}
n--;
}
cout<<ans;
fclose(stdin);
fclose(stdout);
return 0;
}