45:金币
#include <iostream>
using namespace std;
int main(){
int d,d1=2,moe=1,mymoe=0;
cin >> d;
for(int i=1;i<d;i++){
if(d1%moe==0){d1=0;moe++;} //跳过第一天
mymoe +=moe;
d1 ++;
}cout << mymoe+1;
}
说实话,我都不敢说简单了,别人可能有更简单的算法。
我也不知道上一个博客怎么有6个人看了,这对我来说已经很多了,但为啥偏偏是那个。
我研究数据结构去了,我可真是个菜鸡呢