0
已解决
王耀森
中级光能
中级光能
题目链接: 酷町堂:1751
大佬们帮忙找下错
#include<bits/stdc++.h>
using namespace std;
int main(){
double a,ans;
cin>>a;
if(a<=100000){
ans=a*0.1;
}else if(a<=200000){
ans=(a-100000)*0.075+100000*0.1;
}else if(a<=400000){
ans=(a-200000)*0.05+(200000-100000)*0.075+00000*0.1;
}else if(a<=600000){
ans=(a-400000)*0.03+ (400000-200000)*0.05+(200000-100000)*0.075+100000*0.1;
}else{
ans=(a-600000)*0.015+ (600000- 400000)*0.03+ (400000- 200000)*0.05+ (200000- 100000)*0.075+100000*0.1;}
cout<<setprecision(2)<<fixed<<ans;
return 0 ;
}