#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int i;
int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;
cin>>i;
cout <<setprecision(6);
cout <<fixed;
bonus1=10*0.1;
bonus2=bonus1+10*0.075;
bonus4=bonus2+20*0.05;
bonus6=bonus4+20*0.03;
bonus10=bonus6+40*0.015;
if(i<=10)
bonus=i*0.1;
else if (i<=20)
bonus=bonus1+(i-10)*0.075;
else if (i<=40)
bonus=bonus2+(i-20)*0.05;
else if (i<=60)
bonus=bonus4+(i-40)*0.03;
else if (i<=100)
bonus=bonus6+(i-60)*0.015;
else
bonus=bonus10+(i-100)*0.01;
cout <<bonus<<endl;
return 0;
}
onemoo
相关分类