31 lines
578 B
C++
31 lines
578 B
C++
#include<iostream>
|
|
#include<iomanip>
|
|
using namespace std;
|
|
int main(){
|
|
int wei;
|
|
cin>>wei;
|
|
if(wei<=10){
|
|
cout<<setiosflags(ios::fixed)
|
|
<<setprecision(2)
|
|
<<0.8*wei+0.2
|
|
<<endl;
|
|
}
|
|
else if(wei>10 && wei<=20){
|
|
cout<<setiosflags(ios::fixed)
|
|
<<setprecision(2)
|
|
<<8+0.75*(wei-10)+0.2
|
|
<<endl;
|
|
}
|
|
else if(wei>20 && wei<=30){
|
|
cout<<setiosflags(ios::fixed)
|
|
<<setprecision(2)
|
|
<<8+7.5+0.7*(wei-20)+0.2
|
|
<<endl;
|
|
}
|
|
else{
|
|
cout<<"ÎÞ·¨ÓʼÄ"<<endl;
|
|
}
|
|
return 0;
|
|
}
|
|
|