Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72932 王馨桐 09优惠活动 C++ Accepted 1 MS 268 KB 297 2024-05-14 18:34:37

Tests(4/4):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char c; double a; cin>>c>>a; if(c=='P'){ printf("%.2lf", a*0.7); } else if(c=='G'){ printf("%.2lf", a*0.8); } else if(c=='S'){ printf("%.2lf", a*0.9); } else{ printf("%.2lf", a*0.95); } return 0; }