CCF—工资计算 20161202
2017-09-19 19:40
218 查看
#include <iostream>
using namespace std;
int main() {
int t,s,temp;
cin>>t;
int a1=1500*0.97, b1=a1;
int a2=(4500-1500)*0.9, b2=b1+a2;
int a3=(9000-4500)*0.8, b3=b2+a3;
int a4=(35000-9000)*0.75, b4=b3+a4;
int a5=(55000-35000)*0.7, b5=b4+a5;
int a6=(80000-55000)*0.65, b6=b5+a6;
temp=t-3500;
if(temp<0) s=t;
else if(temp<=b1&&temp>0) s=3500+temp/0.97;
else if(temp<=b2&&temp>b1) s=5000+(temp-b1)/0.9;
else if(temp<=b3&&temp>b2) s=8000+(temp-b2)/0.8;
else if(temp<=b4&&temp>b3) s=12500+(temp-b3)/0.75;
else if(temp<=b5&&temp>b4) s=38500+(temp-b4)/0.7;
else if(temp<=b6&&temp>b5) s=58500+(temp-b5)/0.65;
else if(temp>b6) s=83500+(temp-b6)/0.55;
cout<<s<<endl;
}
using namespace std;
int main() {
int t,s,temp;
cin>>t;
int a1=1500*0.97, b1=a1;
int a2=(4500-1500)*0.9, b2=b1+a2;
int a3=(9000-4500)*0.8, b3=b2+a3;
int a4=(35000-9000)*0.75, b4=b3+a4;
int a5=(55000-35000)*0.7, b5=b4+a5;
int a6=(80000-55000)*0.65, b6=b5+a6;
temp=t-3500;
if(temp<0) s=t;
else if(temp<=b1&&temp>0) s=3500+temp/0.97;
else if(temp<=b2&&temp>b1) s=5000+(temp-b1)/0.9;
else if(temp<=b3&&temp>b2) s=8000+(temp-b2)/0.8;
else if(temp<=b4&&temp>b3) s=12500+(temp-b3)/0.75;
else if(temp<=b5&&temp>b4) s=38500+(temp-b4)/0.7;
else if(temp<=b6&&temp>b5) s=58500+(temp-b5)/0.65;
else if(temp>b6) s=83500+(temp-b6)/0.55;
cout<<s<<endl;
}
相关文章推荐
- CCF-20161202-工资计算(100分)
- 【CCFCSP】201612-2 工资计算
- CCF 201612-2 工资计算
- CCF 历年真题之工资计算(_1612_2_WageCalculation.java)参考答案
- CCF CSP试题 201612-2 工资计算
- CCF工资计算
- ccf试题 工资计算
- ccf csp第九次认证考试 第二题 工资计算
- 第九次ccf-工资计算
- CCF CSP 201712-2 工资计算
- CCF-工资计算
- CCF CSP 认证 201612-2 工资计算 java版
- CCF工资计算
- ccf工资计算 暴力枚举
- CCF 2016 工资计算C++,Java,工资计算解题思路
- CCF-CSP 工资计算 201612-2
- CCF CSP 2016年12月第2题 工资计算 (模拟 || 打表)
- [CCF] 201612-2 工资计算
- ccf csp 201612-2 工资计算
- CCF CSP认证 201612-2工资计算