第一次做蓝题,可是他不是蓝题
2023-07-28 21:00:55
发布于:上海
18阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main(){
int counter=0;
double saved=0;
int nowmoney=0;
for (int i=0; i<12; i++){
counter-=1;
int mu;
cin >> mu;
nowmoney+=300;
if (nowmoney<mu){
cout << counter;
return 0;
}
nowmoney-=mu;
int tosavemoney=(nowmoney/100)*100;
nowmoney-=tosavemoney;
saved+=tosavemoney;
}
cout << saved*1.2+nowmoney;
}
这里空空如也
有帮助,赞一个