提交时间:2020-08-22 11:31:03

运行 ID: 6038

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