Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- left_chairs = 0
- enough_chairs = True
- for i in range(1, n + 1):
- tokens = input().split(' ')
- chairs = len(tokens[0])
- people = int(tokens[1])
- if chairs >= people:
- left_chairs += chairs - people
- else:
- print(f'{people - chairs} more chairs needed in room {i}')
- enough_chairs = False
- if enough_chairs:
- print(f'Game On, {left_chairs} free chairs left')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement