#CCBCHMUOI0000039. Phiếu gửi xe theo giờ (Hourly Parking Ticket)
Phiếu gửi xe theo giờ (Hourly Parking Ticket)
Hourly Parking Ticket
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
A parking lot charges integer hours. Vehicle codes 1, 2 and 3 cost 2000, 4000 and 10000 VND per hour, respectively. Given a valid vehicle code m and a valid duration h, compute the rate multiplied by h. No opening fee or discount applies.
Input
Two integers m (vehicle code) and h (number of hours), in that order.
Output
Print the integer parking fee in VND.
Subtasks
- Subtask 1 (20%): m = 1 and 1 <= h <= 5.
- Subtask 2 (30%): 1 <= m <= 2 and 1 <= h <= 24.
- Subtask 3 (50%): 1 <= m <= 3 and 1 <= h <= 24.
Examples
Example 1
Input
1 1
Output
2000
Explanation
Type 1 costs 2000 VND/hour, so one hour costs 2000.
Example 2
Input
3 24
Output
240000
Explanation
Type 3 costs 10000 VND/hour, so 24 hours cost 240000.