← Back to List

1822번: 차집합 ↗

Solutions

Python 3
182 B | 182 chars
n,m=list(map(int,input().split()))
a=set(list(map(int,input().split())))
b=set(list(map(int,input().split())))
s=a-b
print(len(s))
s=list(s)
s.sort()
for i in s:
    print(i,end=" ")