解题思路:
注意事项:
参考代码:
#include
int main()
{
int l,j;
scanf("%d",&l);
if(l<=100000)
{
j=l*0.1;
}
else if(100000<l&&l<=200000)
{
j=100000*0.1+(l-100000)*0.075;
}
else if(200000<l&&l<=400000)
{
j=100000*0.1+(200000-100000)*0.075+(l-200000)*0.05;
}
else if(400000<l&&l<=600000)
{
j=100000*0.1+(200000-100000)*0.075+(400000-200000)*0.05+(l-400000)*0.03;
}
else if(600000<l&&l<=1000000)
{
j=100000*0.1+(200000-100000)*0.075+(400000-200000)*0.05+(600000-400000)*0.03+(l-600000)*0.015;
}
else
{
j=100000*0.1+(200000-100000)*0.075+(400000-200000)*0.05+(600000-400000)*0.03+(1000000-600000)*0.015+(l-1000000)*0.01;
}
printf("%d",j);
return 0;
}
0.0分
2 人评分