#include <iostream>
using namespace std;
int main() {
int n; // Số kWh tiêu thụ trong tháng
long long tienDien = 0; // Tổng tiền điện phải trả
// Nhập số kWh
cout << "Nhap so kWh dien tieu thu: ";
cin >> n;
// Tính tiền điện theo từng mức
if (n <= 100) {
tienDien = n * 750;
} else if (n <= 200) {
tienDien = 100 * 750 + (n - 100) * 1250;
} else if (n <= 300) {
tienDien = 100 * 750 + 100 * 1250 + (n - 200) * 1750;
} else {
tienDien = 100 * 750 + 100 * 1250 + 100 * 1750 + (n - 300) * 3000;
}
// Hiển thị kết quả
cout << "Tong tien dien phai tra la: " << tienDien << " VND" << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpbnQgbjsgLy8gU+G7kSBrV2ggdGnDqnUgdGjhu6UgdHJvbmcgdGjDoW5nCiAgICBsb25nIGxvbmcgdGllbkRpZW4gPSAwOyAvLyBU4buVbmcgdGnhu4FuIMSRaeG7h24gcGjhuqNpIHRy4bqjCgogICAgLy8gTmjhuq1wIHPhu5Ega1doCiAgICBjb3V0IDw8ICJOaGFwIHNvIGtXaCBkaWVuIHRpZXUgdGh1OiAiOwogICAgY2luID4+IG47CgogICAgLy8gVMOtbmggdGnhu4FuIMSRaeG7h24gdGhlbyB04burbmcgbeG7qWMKICAgIGlmIChuIDw9IDEwMCkgewogICAgICAgIHRpZW5EaWVuID0gbiAqIDc1MDsKICAgIH0gZWxzZSBpZiAobiA8PSAyMDApIHsKICAgICAgICB0aWVuRGllbiA9IDEwMCAqIDc1MCArIChuIC0gMTAwKSAqIDEyNTA7CiAgICB9IGVsc2UgaWYgKG4gPD0gMzAwKSB7CiAgICAgICAgdGllbkRpZW4gPSAxMDAgKiA3NTAgKyAxMDAgKiAxMjUwICsgKG4gLSAyMDApICogMTc1MDsKICAgIH0gZWxzZSB7CiAgICAgICAgdGllbkRpZW4gPSAxMDAgKiA3NTAgKyAxMDAgKiAxMjUwICsgMTAwICogMTc1MCArIChuIC0gMzAwKSAqIDMwMDA7CiAgICB9CgogICAgLy8gSGnhu4NuIHRo4buLIGvhur90IHF14bqjCiAgICBjb3V0IDw8ICJUb25nIHRpZW4gZGllbiBwaGFpIHRyYSBsYTogIiA8PCB0aWVuRGllbiA8PCAiIFZORCIgPDwgZW5kbDsKCiAgICByZXR1cm4gMDsKfQo=