#include <stdio.h>
int main() {
float t, a, s;
scanf("%f", &s);
a = s - 3500;
if (a <= 0)
t = s;
else if (a <= 1500)
t = s - a * 0.03;
else if (a > 1500 && a <= 4500)
t = s - (a - 1500) * 0.1 - 1500 * 0.03;
else if (a > 4500 && a <= 9000)
t = s - (a - 4500) * 0.2 - 1500 * 0.03 - 3000 * 0.1;
else if (a > 9000 && a <= 35000)
t = s - (a - 9000) * 0.25 - 1500 * 0.03 - 3000 * 0.1 - 4500 * 0.2;
else
t = s - (a - 35000) * 0.3 - 1500 * 0.03 - 3000 * 0.1 - 4500 * 0.2 - 26000 * 0.25;
printf("%.0f", t);
return 0;
}
XDOJ P63-工资计算
最新推荐文章于 2025-12-11 12:34:30 发布
508

被折叠的 条评论
为什么被折叠?



