| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149025 | 赖泓宇 | 09优惠活动 | C++ | Accepted | 0 MS | 272 KB | 448 | 2026-03-06 18:32:24 |
#include <iostream> #include <iomanip> using namespace std; int main() { char type; double price, pay; cin >> type >> price; if (type == 'P') { pay = price * 0.7; } else if (type == 'G') { pay = price * 0.8; } else if (type == 'S') { pay = price * 0.9; } else { pay = price * 0.95; } cout << fixed << setprecision(2) << pay << endl; return 0; }