Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
6087 | JiangGuangrui | 小玉家的电费 | C++ | 通过 | 100 | 0 MS | 748 KB | 391 | 2020-08-22 14:52:00 |
#include <iostream> #include <cstdio> using namespace std; int main() { int d; double m; cin >> d; if(d <=150) { m = d * 0.4463; printf("%.1f\n",m); } else if(d > 150 && d <= 400) { m = 150 * 0.4463 + (d - 150) * 0.4663; printf("%.1f\n",m); } else { m = 150 * 0.4463 + 250 * 0.4663 + (d-400) * 0.5663; printf("%.1f\n",m); } return 0; }