Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
73767 刘珩宇 09优惠活动 C++ Accepted 0 MS 272 KB 297 2024-05-19 15:59:30

Tests(4/4):


Code:

#include<iostream> using namespace std; int main() { int a; char s; float c; cin>>s>>a; switch(s){ case 'P': c=a*0.7; break; case 'G': c=a*0.8; break; case 'S': c=a*0.9; break; default: c=a*0.95; break; } printf("%.2lf\n",c); return 0; }