Programming Fundamentals CondStatements&Loops Problem 04 Hotel
Здравейте> Имам проблем със тази задача. Повече от 77/100 не мога да стигна в judge..Моля за насоки!!
Ето и задачата:
Problem 1. Hotel
A hotel has three types of rooms: studio, double and master suite. The prices are different for the different months:
May and October |
June and September |
July, August and December |
Studio - 50 leva per night |
Studio - 60 leva per night |
Studio - 68 leva per night |
Double - 65 leva per night |
Double - 72 leva per night |
Double - 77 leva per night |
Suite - 75 leva per night |
Suite - 82 leva per night |
Suite - 89 leva per night |
They have also the following discounts:
- For studio and more than 7 nights in May and October: 5% discount
- For double and more than 14 nights in June and September: 10% discount
- For suite and more than 14 nights in July, August and December: 15% discount
- For studio and more than 7 nights in September and October: one night is free
Input
The input consists of exactly 2 lines:
- First line: Month – May, June, July, August, September, October or December
- Second line: Nights Count – an integer between [0 ... 200]
Output
Print 3 lines on the console:
- On the first: “Studio: {price for the stay} lv.”
- On the second: “Double: {price for the stay} lv.”
- On the third: “Suite: {price for the stay} lv.”
Format the prices to the 2nd decimal place.
Ето и моя код: https://pastebin.com/WcMeGsy2