Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rooms = int(input())
- total_chairs = []
- for i in range(rooms):
- room = input().split(' ')
- diff_chairs = len(room[0]) - int(room[1])
- total_chairs.append(diff_chairs)
- if len(total_chairs) == len([x for x in total_chairs if x >= 0]):
- print(f'Game On, {sum(total_chairs)} free chairs left')
- else:
- for i in range(len(total_chairs)):
- if total_chairs[i] < 0:
- print(f'{abs(total_chairs[i])} more chairs needed in room {i + 1}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement