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