或许是循环没加=?
by 夢·壹生所愛 @ 2018-02-28 16:07:14
# 见代码
```cpp
#include<bits/stdc++.h>
using namespace std;
long long money,n,i,sy;
int main()
{
cin>>n;
while(n>=sy)
{
i++;
money+=i*i;
sy+=i;
}
cout<<money-(sy-n)*i;
return 0;
}
```
by 阔耐滴大纸张 @ 2018-02-28 16:19:02
@[123sun123](/space/show?uid=87550)
by 阔耐滴大纸张 @ 2018-02-28 16:19:06
@[lovelausanneforever](/space/show?uid=61644)
谢谢
by 123sun123 @ 2018-02-28 18:03:52
@[阔耐滴大纸张](/space/show?uid=43549)
。。。
by 123sun123 @ 2018-02-28 18:04:00