Помощ за задача 03.Vacation
Не мога да разбера защо Judge ми дава 91/100.
Линк към Judge: https://judge.softuni.bg/Contests/Compete/Index/1204#2
Моето решение: https://pastebin.com/z7g8Wyzf
Ако може да ми помогнете да разбера къде греша?
Условието:
3. Vacation
You are given a group of people, type of the group, on which day of the week they are going to stay. Based on that information calculate how much they have to pay and print that price on the console. Use the table below. In each cell is the price for a single person. The output should look like that: “Total price: {price}”. The price should be rounded to the second decimal point.
|
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 bigger than or equal to 30 people you should reduce the total price by 15%
- usiness – if the group is bigger than or equal to 100 people 10 of them can stay for free.
- Regular – if the group is bigger than or equal to 10 and less than or equal to 20 reduce the total price by 5%
You should reduce the prices in that EXACT order
Examples
Input |
Output |
30 Students Sunday |
Total price: 266.73 |
40 Regular Saturday |
Total price: 800.00 |
Не е това.Пробвах но реално погледнато отговора ще е същия.Пробвах но все пак 91/100.Гърми ми последния тест в Judge.
Да ти кажа това трябва да е. Пробвай с вход 35, Strudents, Friday
Сумата ПРЕДИ отстъпките е 295.75
sum = 0.85 * sum = 251.39
sum = sum - ((sum * 15)/100) = 213.68
Дебъгни го
Пробвах и вашия вариант но не стана. Judge си дава 91/100 точки.