#include<stdio.h> #include<math.h> int main() { int x; scanf("%d",&x); if(x<=100000) printf("%d",x*0.1); if(x>100000&&x<=200000) printf("%d",10000+(x-100000)*0.075); if(x>200000&&x<=400000) printf("%d",17500+(x-200000)*0.05); if(x>400000&&x<=600000) printf("%d",27500+(x-400000)*0.03); if(x>600000&&x<=1000000) printf("%d",33500+(x-600000)*0.015); if(x>1000000) printf("%d",39500+(x-1000000)*0.01); return 0; } |
Double click to view unformatted code.