Advertisement
horozov86

Party

May 10th, 2023
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. def print_func(not_arrived_quests):
  2.     print(len(not_arrived_quests))
  3.     for person in sorted(not_arrived_quests):
  4.         print(person)
  5.  
  6.  
  7. n = int(input())
  8.  
  9. invited_guests = set()
  10. arrived_quests = set()
  11.  
  12. for _ in range(n):
  13.     guest = input()
  14.  
  15.     invited_guests.add(guest)
  16.  
  17. while True:
  18.     data = input()
  19.  
  20.     if data == "END":
  21.         break
  22.     arrived_quests.add(data)
  23.  
  24. missed_quests = invited_guests.difference(arrived_quests)
  25.  
  26. print_func(missed_quests)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement