You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
940 B

#include <bits/stdc++.h>
using namespace std;
int main() {
long long l, s;
cin >> l;
if (l > 1000000) {
s = 100000 * 0.1 + (200000 - 100000) * 0.075 + (400000 - 200000) * 0.05 + (600000 - 400000) * 0.03 +
(1000000 - 600000) * 0.015 + (l - 1000000) * 0.01;
} else if (l > 600000 && l <= 1000000) {
s = 100000 * 0.1 + (200000 - 100000) * 0.075 + (400000 - 200000) * 0.05 + (600000 - 400000) * 0.03 +
(l - 600000) * 0.015;
} else if (l > 400000 && l <= 600000) {
s = 100000 * 0.1 + (200000 - 100000) * 0.075 + (400000 - 200000) * 0.05 + (l - 400000) * 0.03;
} else if (l > 200000 && l <= 400000) {
s = 100000 * 0.1 + (200000 - 100000) * 0.075 + (l - 200000) * 0.05;
} else if (l > 100000 && l <= 200000) {
s = 100000 * 0.1 + (l - 100000) * 0.075;
} else {
s = l * 0.1;
}
printf("%lld", s);
return 0;
}