Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sea_trip_count = int(input())
- mountain_trip_count = int(input())
- command = input()
- price_of_sea_trip = 680
- price_of_mountain_trip = 499
- profit = 0
- is_sold = False
- while command != 'Stop':
- destination = command
- if destination == 'sea' and sea_trip_count > 0:
- profit += price_of_sea_trip
- sea_trip_count -= 1
- elif destination == 'mountain' and mountain_trip_count > 0:
- profit += price_of_mountain_trip
- mountain_trip_count -= 1
- if sea_trip_count == 0 and mountain_trip_count == 0:
- is_sold = True
- break
- command = input()
- if is_sold:
- print("Good job! Everything is sold.")
- print(f"Profit: {profit} leva.")
- else:
- print(f"Profit: {profit} leva.")
Advertisement
Add Comment
Please, Sign In to add comment