#C. 练21.2  邮寄包裹

    Type: RemoteJudge 1000ms 64MiB

练21.2  邮寄包裹

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

邮局对邮寄包裹有如下规定:若包裹的重量超过 3030 千克,不予邮寄,对可以邮寄的包裹每件收手续费 0.20.2 元,再加上根据下表按重量 xx 计算的结果。





重量(千克) 收费标准(元/公斤)
$x≤10$ $0.80$
$10< x≤20$ $0.75$
$20< x≤30$ $0.70$

请你编写一个程序,输入包裹重量,输出所需费用或"Fail"表示无法邮寄。

输入格式

输入一个整数 xx,表示包裹的重量(单位:千克)。(0<x1000< x≤100)

输出格式

输出对应的费用(答案保留 22 位小数)或"Fail"表示无法邮寄。

样例

15
11.95

样例解释: 15公斤,10公斤的部分收取0.8*10 =8元,超过10公斤的部分5X0.75=3.755 X 0.75 = 3.75元,手续费0.2元,共11.95元

20240501

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
4
Start at
2024-5-1 12:13
End at
2024-5-2 8:13
Duration
20 hour(s)
Host
Partic.
7