#PCBBAY0000057. Giá sau giảm (Price after Discount)
Giá sau giảm (Price after Discount)
Price after Discount
Version: Phuoc Hung OJ Extended
Problem Statement
An item has original price and a decimal discount rate (for example, means a discount). Its final price is . Print the price payable after discount with exactly 2 decimal places.
Input
The only line contains real values (original price) and (decimal discount rate).
Output
Print the price after discount with exactly 2 decimal places.
Subtasks
- Subtask 1 (100 points): ; .
Examples
Example 1
Input
100 0.2
Output
80.00
Explanation. Substituting 100, 0.2 into price × (1-rate) gives approximately 80. The required output formatting produces 80.00.
Example 2
Input
19.99 0.15
Output
16.99
Explanation. Substituting 19.99, 0.15 into price × (1-rate) gives approximately 16.9915. The required output formatting produces 16.99.
Example 3
Input
0 0.5
Output
0.00
Explanation. Substituting 0, 0.5 into price × (1-rate) gives approximately 0. The required output formatting produces 0.00.