Submit | All submissions | Best solutions | Back to list |
EIEASY07 - Electricity bill |
The electricity company offers the following formula for calculating the electricity bill:
The electricity company offers the following formula for calculating the electricity bill:
- The first 100 kWh cost 200 VND/Wh
- 1000 kWh for the subsequent price of 500 VND / kWh
- The next 2000 kWh are priced at 1,000 VND / kWh
- Next 5,000 kWh, priced at 10,000 VND / kWh
- Next 10,000 kWh are priced at 12,000 VND / kWh
- The remaining amount is 100,000 VND / kWh
Assuming that k kwh is consumed, how much is paid?
- The first 100 kWh cost 200 VND/Wh
- Next 1000 kWh for the subsequent price of 500 VND / kWh
- Next 2000 kWh are priced at 1,000 VND / kWh
- Next 5,000 kWh, priced at 10,000 VND / kWh
- Next 10,000 kWh are priced at 12,000 VND / kWh
- The remaining amount is 100,000 VND / kWh
Assuming that k kwh is consumed, what is the cost of the bill ?
Input
Only integer k(k<=10^9)
Output
Amount to pay
Example
Input: 150 Output: 45000