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