Workspace Người dùng nguyendoannamanh_6i02526

Từ

Giới thiệu

include <iostream>

using namespace std; int main() { long long x; cin >> x; long long total = 0; if (x <= 100) { total = x * 2000; } else if (x <= 200) { total = 100 * 2000 + (x - 100) * 3000; } else if (x <= 300) { total = 100 * 2000 + 100 * 3000 + (x - 200) * 5000; } else { total = 100 * 2000 + 100 * 3000 + 100 * 5000 + (x - 300) * 10000; } cout << total << endl; return 0; }

Lịch sử xếp hạng