0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 02:38:49 +00:00

P1422 小玉家的电费

R58783891
This commit is contained in:
Baoshuo Ren 2021-09-30 13:16:56 +08:00 committed by Baoshuo Ren
parent 07a1a83ac8
commit 6cf0a2271b
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,11 @@
#include <bits/stdc++.h>
using namespace std;
int a;
int main() {
cin >> a;
cout << fixed << setprecision(1) << (a > 150 ? 0.4463 * 150 + (a > 400 ? 0.4663 * 250 + 0.5663 * (a - 400) : 0.4663 * (a - 150)) : 0.4463 * a) << endl;
return 0;
}