Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- win_total = 0
- lose_total = 0
- sum_total = 0
- for i in range(days):
- win = 0
- lose = 0
- sum = 0
- while True:
- command = input()
- if command == "win":
- sum += 20
- win += 1
- elif command == "lose":
- lose += 1
- elif command == "Finish":
- if win > lose:
- sum_total += sum * 1.1
- win_total += win
- else:
- sum_total += sum
- lose_total += lose
- break
- if win_total > lose_total:
- print(f"You won the tournament! Total raised money: {sum_total * 1.2:.2f}")
- else:
- print(f"You lost the tournament! Total raised money: {sum_total:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement