问题链接:http://115.28.138.223/view.page?gpid=T51
#include <stdio.h> int main(){ int at_wage,S; scanf("%d",&at_wage); if(at_wage <= 3500) printf("%d ",S = at_wage); else if(at_wage <= 4955){//3500+1500-45 printf("%d ",S = (3500 + (at_wage-3500)*100/97)); //税前工资为一个整百的数,所以一定可以整除 } else if(at_wage <= 7655){//4955+3000-300 printf("%d ",S = 5000+(at_wage-4955)*100/90); } else if(at_wage <= 11255){//7655+4500-900 printf("%d ",S = 8000+(at_wage-7655)*100/80); } else if(at_wage <= 30755){//11255+26000-6500 printf("%d ",S = 12500+(at_wage-11255)*100/75); } else if(at_wage <= 44755){//30755+20000-6000 printf("%d ",S = 38500+(at_wage-30755)*100/70); } else if(at_wage <= 61005){//44755+25000-8750 printf("%d ",S = 58500+(at_wage-44755)*100/65); } else{ printf("%d ",S = 83500+(at_wage-61005)*100/55); } return 0; }