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