【例16.3】 收费
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.
Description
When traveling by plane, if a passenger's luggage weighs less than or equal to 20 kilograms, the fee is 1.68 yuan per kilogram. If the luggage weighs more than 20 kilograms, the fee is 1.98 yuan per kilogram. Write a program to calculate the fee (rounded to 2 decimal places).
Input Format
The weight of the luggage.
Output Format
The fee (rounded to 2 decimal places).
Sample
20.0033.60
20251108 A班作业(6)
- Status
- Done
- Problem
- 5
- Open Since
- 2025-11-8 0:00
- Deadline
- 2025-11-29 23:59
- Extension
- 24 hour(s)