Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import deque
- commands = input().split()
- uniqueCommands = deque()
- [uniqueCommands.append(i) for i in commands if i not in uniqueCommands]
- aTeamCount = 11
- bTeamCount = 11
- while bool(uniqueCommands) and aTeamCount > 6 and bTeamCount > 6:
- currTeamCommand = uniqueCommands.popleft()[0]
- if currTeamCommand != "A":
- bTeamCount -= 1
- else:
- aTeamCount -= 1
- print(f"Team A - {aTeamCount}; Team B - {bTeamCount}")
- if aTeamCount < 7 or bTeamCount < 7:
- print("Game was terminated")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement