#C2566. Calculate Discount Price
Calculate Discount Price
Calculate Discount Price
Given the original price of an item and a membership indicator, compute the price after applying the discount.
If the buyer is a member (denoted by 1), the discount is 20%, so the final price is \(price \times 0.8\). Otherwise (denoted by 0), a discount of 10% is applied, giving \(price \times 0.9\).
For example, if the price is 100 and the buyer is a member, the final price is 80.0.
inputFormat
The input consists of two tokens separated by space. The first token is a floating-point number representing the price, and the second token is an integer (1 for member, 0 for non-member). Input is read from the standard input (stdin).
outputFormat
Output a single floating-point number representing the discounted price. The result should be written to the standard output (stdout).## sample
100 1
80.0