提交时间:2020-08-22 10:35:30

运行 ID: 6018

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