Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
90997 林嘉乐 09优惠活动 C++ Accepted 1 MS 276 KB 340 2024-09-20 19:48:52

Tests(4/4):


Code:

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