Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156666 王艺博 09优惠活动 C++ Accepted 3 MS 276 KB 422 2026-07-05 08:58:27

Tests(4/4):


Code:

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