03. Vacation 91/100
Здравейте в тази задача не мога да си намеря грешката. Може ли някой да ми помогне?
Това е линк към кода ми: https://pastebin.com/H5uL30JC
Условието на задачата:
You will receive three lines from the console:
- A count of people who are going on vacation.
- Type of the group (Students, Business or Regular).
- The day of the week which the group will stay on (Friday, Saturday or Sunday).
Based on the given information calculate how much the group will pay for the entire vacation.
The price for a single person is as follows:
|
Friday |
Saturday |
Sunday |
Students |
8.45 |
9.80 |
10.46 |
Business |
10.90 |
15.60 |
16 |
Regular |
15 |
20 |
22.50 |
There are also discounts based on some conditions:
- Students – if the group is 30 or more people, you should reduce the total price by 15%.
- Business – if the group is 100 or more people, 10 of the people stay for free.
- Regular – if the group is between 10 and 20 people (both inclusively), reduce the total price by 5%.
Note: You should reduce the prices in that EXACT order!
As an output print the final price which the group is going to pay in the format:
"Total price: {price}"
The price should be formatted to the second decimal point.
Examples
Input |
Output |
30 Students Sunday |
Total price: 266.73 |
40 Regular Saturday |
Total price: 800.00 |