文章
11
粉丝
0
获赞
35
访问
2.7k
#include<iostream>
using namespace std;
int main(){
long long profit; // 使用 long long 防止溢出
double bonus = 0; // 使用 double 保留小数
cin >> profit;
if(profit > 1000000){
bonus = (profit - 1000000) * 0.01 +
400000 * 0.015 +
200000 * 0.03 +
200000 * 0.05 +
100000 * 0.075 +
100000 * 0.1;
} else if(profit > 600000){ // 注意:这里不需要写 &&,因为上面已经过滤了
bonus = (profit - 600000) * 0.015 +
200000 * 0.03 +
200...
登录后发布评论
暂无评论,来抢沙发