打表学神绝杀

魈凯KBS  •  2个月前


include<bits/stdc++.h> using namespace std; int main(){

double w,s; cin>>w; if(w<=10){ s=0.2+w*0.8; cout<<fixed<<setprecision(2)<<s; }

else if(w<=20){

s=0.2+100.8+(w-10)0.75; cout<<fixed<<setprecision(2)<<s; }

else if(w<=30){

s=0.2+100.75+100.8+(w-20)*0.7; cout<<fixed<<setprecision(2)<<s; }

if(w>30){ cout<<"Fail"<<endl; cout<<fixed<<setprecision(2)<<s; }

return 0;}


评论: