Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- room = input()
- scale = input()
- bonus = 0
- if room == "room for one person":
- total_nights = (days - 1) * 18
- bonus = 0
- if scale == "positive":
- bonus_2 = (0.25 * total_nights) + total_nights
- elif scale == "negative":
- bonus_2 = total_nights - (0.10 * total_nights)
- print(f"{bonus_2:.2f}")
- elif room == "apartment":
- total_nights = (days - 1) * 25
- if days < 10:
- bonus = 0.30
- elif 10 <= days <= 15:
- bonus = 0.35
- elif days > 15:
- bonus = 0.5
- bonus_4 = total_nights - (bonus * total_nights)
- if scale == "positive":
- extra = bonus_4 * 0.25
- whole_price = bonus_4 + extra
- elif scale == "negative":
- extra = bonus_4 * 0.10
- whole_price = bonus_4 - extra
- print(f"{whole_price:.2f}")
- if room == "president apartment":
- total_nights = (days - 1) * 35
- if days < 10:
- bonus = 0.1
- elif 10 <= days <= 15:
- bonus = 0.15
- elif days > 15:
- bonus = 0.2
- bonus_5 = total_nights - (bonus * total_nights)
- if scale == "positive":
- extra = bonus_5 * 0.25
- whole_price = bonus_5 + extra
- elif scale == "negative":
- extra = bonus_5 * 0.10
- whole_price = bonus_5 - extra
- print(f"{whole_price:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment