提交时间:2020-08-22 10:34:44

运行 ID: 6016

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