Ddimov90

ski_trip_09_02

Sep 30th, 2025
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | Source Code | 0 0
  1. days = int(input())
  2. accommodation = input()
  3. score = input()
  4.  
  5. price = 0
  6.  
  7. if accommodation == "room for one person":
  8.     price = 18
  9.  
  10. elif accommodation == "apartment":
  11.     price = 25
  12.     if days >= 15:
  13.         price *= 0.5
  14.     elif days >= 10:
  15.         price *= 0.65
  16.     else:
  17.         price *= 0.7
  18.  
  19. else:
  20.     price = 35
  21.     if days >= 15:
  22.         price *= 0.8
  23.     elif days >= 10:
  24.         price *= 0.85
  25.     else:
  26.         price *= 0.9
  27.  
  28. if score == "positive":
  29.     price *= 1.25
  30. else:
  31.     price *= 0.9
  32.  
  33. print(f"{(days - 1) * price:.2f}")
  34.  
Advertisement
Add Comment
Please, Sign In to add comment