提交时间:2020-08-20 14:05:18

运行 ID: 5870

#include <iostream> #include <cstdio> using namespace std; int main () { int tt; double d; cin >> tt; if (tt < 150) d = tt * 0.4463; else if (tt <400 && tt > 151) d = (tt - 150) * 0.4663 + 150 * 0.4463; else if (tt > 401) d = (tt - 400 ) * 0.5663 + 150 * 0.4463 + 250 * 0.4663; printf ("%.1f",d); return 0; }