[백준/11723] 집합
·
PS/BOJ&Programmers
💻 전체 코드 import sys n = int(sys.stdin.readline()) s = set() for _ in range(n): words = sys.stdin.readline().split() command = words[0] if command == 'add': s.add(int(words[1])) elif command == 'remove': s.discard(int(words[1])) elif command == 'check': if int(words[1]) in s: print(1) else: print(0) elif command == 'toggle': if int(words[1]) in s: s.discard(int(words[1])) else: s.add(int(words[1])..