문제
링크텍스트
난관
def solution(X, Y):
Z = []
for i in range(9,-1,-1):
xi = X.count(str(i))
yi = Y.count(str(i))
zi = min([xi,yi])
if zi > 0:
for j in range(zi):
Z.append(i)
if len(Z) == 0:
answer = '-1'
elif any(Z) == False:
answer = '0'
else:
answer = ''
for zi in Z:
answer += str(zi)
return answer