#PCBBAY0000034. Thành tiền hai chữ số (Item Total with Two Decimals)
Thành tiền hai chữ số (Item Total with Two Decimals)
Item Total with Two Decimals
Version: Phuoc Hung OJ Extended
Problem Statement
An item has unit price and integer quantity . Compute the total price using the parsed real value and print exactly 2 decimal places. Format only after multiplication; do not round the unit price first.
Input
The only line contains real unit price and integer quantity , in that order.
Output
Print total price with exactly 2 decimal places.
Subtasks
- Subtask 1 (100 points): ; .
Examples
Example 1
Input
19.995 3
Output
59.98
Explanation. The ideal decimal product is . With Python 3 float arithmetic and .2f formatting, the output is 59.98; do not pre-round the unit price.
Example 2
Input
12.5 4
Output
50.00
Explanation. Substituting 12.5, 4 into p × q gives approximately 50. The required output formatting produces 50.00.
Example 3
Input
0.1 3
Output
0.30
Explanation. Substituting 0.1, 3 into p × q gives approximately 0.3. The required output formatting produces 0.30.