0
李智宸
高级守护
高级守护
题目链接: 酷町堂:1753
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
double sum=0.0;
cin>>n;
if(n<=3500)sum=0.0;
else if(n>3500&&n<=5000)sum=(3500-n)*0.03;
else if(n>5000&&n<=8000)sum=(5000-3500)*0.03+(n-5000)*0.10;
else if(n>8000&&n<=12500)sum=(5000-3500)*0.03+(8000-5000)*0.10+(n-8000)*0.20;
else if(n>12500&&n<=38500)sum=(5000-3500)*0.03+(8000-5000)*0.10+(12500-8000)*0.20+(n-12500)*0.25;
else if(n>38500&&n<=58500)sum=(5000-3500)*0.03+(8000-5000)*0.10+(12500-8000)*0.20+(38500-12500)*0.25+(n-38500)*0.30;
else if(n<=83500)sum=(5000-3500)*0.03+(8000-5000)*0.1+(12500-8000)*0.2+(38500-12500)*0.25+(58500-38500)*0.3+(n-58500)*0.35;
else sum=(5000-3500)*0.03+(8000-5000)*0.10+(12500-8000)*0.20+(38500-12500)*0.25+(58500-38500)*0.30+(83500-58500)*0.35+(n-83500)*0.45;
printf("%.2f",int(sum*100+0.5)/100.0);
return 0;
}
90分