Run ID:149025

提交时间: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; }