Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input()) # кол-во загаданных чисел
- numbers = set(range(1, n + 1))
- beatris_turn = input()
- while beatris_turn != "HELP":
- named_numbers = set(map(int, beatris_turn.split()))
- answer = input()
- if answer == "YES":
- numbers.intersection_update(named_numbers)
- if answer == "NO":
- numbers.difference_update(named_numbers)
- beatris_turn = input()
- print(*sorted(numbers))
Add Comment
Please, Sign In to add comment