SWEA
[SWEA] 5431. 민석이의 과제 체크하기 (Python)
가은(JANE)
2024. 11. 13. 17:21
#Problem
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
#Think
set은 중복 없애주는 것!
list는 그냥 있는 것!
근데 이거 출력할 때 *set이나 *list으로 출력하는데,
print(f"{tc}", *set)이렇게 "" 안에다 넣어서 출력하면 안 된다.
#Code
T = int(input())
# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.
for tc in range(1, T + 1):
num, a = map(int, input().split())
# num = 수강생 수, a=과제 제출한 사람, a_num = 과제 제출한 사람 번호 리스트
a_num = set(map(int, input().split()))
all_students = set(range(1, num + 1))
result = sorted(all_students - a_num)
print(f"#{tc}" , *result)