Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
4004 邓思博 09优惠活动 C++ Accepted 0 MS 264 KB 429 2024-07-24 14:16:19

Tests(4/4):


Code:

# include<iostream> # include<iomanip> using namespace std; int main(){ char b; double a; cin>>b>>a; cout<<fixed<<setprecision(2); switch(b){ case 'P':cout<<a*0.7<<endl; break; case 'G':cout<<a*0.8<<endl; break; case 'S':cout<<a*0.9<<endl; break; default:cout<<a*0.95<<endl; } return 0; }