Advertisement
Guest User

Untitled

a guest
Dec 25th, 2023
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. from collections import deque
  2.  
  3. commands = input().split()
  4. uniqueCommands = deque()
  5. [uniqueCommands.append(i) for i in commands if i not in uniqueCommands]
  6. aTeamCount = 11
  7. bTeamCount = 11
  8.  
  9. while bool(uniqueCommands) and aTeamCount > 6 and bTeamCount > 6:
  10.     currTeamCommand = uniqueCommands.popleft()[0]
  11.     if currTeamCommand != "A":
  12.         bTeamCount -= 1
  13.     else:
  14.         aTeamCount -= 1
  15.  
  16. print(f"Team A - {aTeamCount}; Team B - {bTeamCount}")
  17. if aTeamCount < 7 or bTeamCount < 7:
  18.     print("Game was terminated")
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement