#P125. 练21.2 邮寄包裹
练21.2 邮寄包裹
Description
The post office has the following rules for mailing packages: if the package weighs more than 30 kilograms, it cannot be mailed. For packages that can be mailed, a handling fee of 0.2 yuan is charged per package, plus the amount calculated according to the following table based on weight x.
| Weight (kg) | Rate (yuan/kg) |
| $x≤10$ | $0.80$ |
| $10< x≤20$ | $0.75$ |
| $20< x≤30$ | $0.70$ |
Write a program that takes the package weight as input and outputs the required fee or "
Fail" if the package cannot be mailed.
Input Format
Input an integer x representing the package weight in kilograms. ()
Output Format
Output the corresponding fee (rounded to 2 decimal places) or "Fail" if the package cannot be mailed.
Sample
75.80