提交时间:2020-08-22 15:11:11

运行 ID: 6096

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