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