Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- total_wins = 0
- total_loses = 0
- total_earned_money = 0
- for i in range(days):
- wins = 0
- loses = 0
- line = input()
- while line != "Finish":
- result = input()
- earned_money = 0
- if result == "win":
- wins += 1
- total_wins += 1
- else:
- loses += 1
- total_loses += 1
- line = input()
- if wins > loses:
- earned_money = wins * 20 * 1.1
- else:
- earned_money = wins * 20
- total_earned_money += earned_money
- if total_wins > total_loses:
- print(f"You won the tournament! Total raised money: {total_earned_money * 1.2:.2f}")
- else:
- print(f"You lost the tournament! Total raised money: {total_earned_money:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement