CCF工资计算
#include<iostream>
using namespace std;
int main(){
int t,s,x,i;
cin>>t;
if(t<=3500) cout<<t;
else{
for(i=3600;i<=200000;i+=100){
if(i>=3600&&i<=5000){
x = (i-3500)*0.97;
if((i-x)==t) {
cout<<i; break;
}
}
else if(i>5000&&i<=8000){
x = 1500*0.03+(i-3500-1500)*0.1;
if((i-x)==t) {
cout<<i; break;
}
}
else if(i>8000&&i<=12500){
x = 1500*0.03+(4500-1500)*0.1+(i-4500-3500)*0.2;
if((i-x)==t) {
cout<<i; break;
}
}
else if(i>12500&&i<=47500){
x = 1500*0.03+(4500-1500)*0.1+(9000-4500)*0.2+(i-3500-9000)*0.25;
if((i-x)==t) {
cout<<i; break;
}
}
else if(i>47500&&i<=102500){
x = 1500*0.03+(4500-1500)*0.1+(9000-4500)*0.2+(35000-9000)*0.25+(i-3500-35000)*0.3;
if((i-x)==t) {
cout<<i; break;
}
}
else if(i>102500&&i<=182500){
x = 1500*0.03+(4500-1500)*0.1+(9000-4500)*0.2+(35000-9000)*0.25+(55000-35000)*0.3+(i-3500-55000)*0.35;
if((i-x)==t) {
cout<<i; break;
}
}
else if(i>182500){
x = 1500*0.03+(4500-1500)*0.1+(9000-4500)*0.2+(35000-9000)*0.25+(55000-35000)*0.3+(80000-55000)*0.35+(i-3500-80000)*0.45;
if((i-x)==t) {
cout<<i; break;
}
}
}
}
}
posted on 2017-03-10 19:17 whitehouse 阅读(189) 评论(0) 编辑 收藏 举报