#CCBCHMUOI0000025. Máy bán vé (Ticket Vending Machine)
Máy bán vé (Ticket Vending Machine)
Ticket Vending Machine
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
A vending machine sells five ticket types numbered 1 to 5. Their unit prices are 15, 20, 25, 30 and 40 monetary units. Given the selected type and quantity, output the total price.
Input
One line contains integers ma and so_luong, the ticket type and quantity.
Output
Print the unit price for the selected ticket type multiplied by the quantity.
Subtasks
- Subtask 1 (20%): 1 <= ma <= 2 and 1 <= so_luong <= 10.
- Subtask 2 (30%): 1 <= ma <= 4 and 1 <= so_luong <= 100.
- Subtask 3 (50%): 1 <= ma <= 5 and 1 <= so_luong <= 1000.
Examples
Example 1
Input
2 3
Output
60
Explanation
Ticket type 2 costs 20 each; three tickets cost 60.
Example 2
Input
5 1000
Output
40000
Explanation
Type 5 costs 40 each, so 1000 tickets cost 40000.