Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = input()
- b = input()
- x = [0] * 10
- y = [0] * 10
- for i in range(10):
- x[i] = a.count(str(i))
- y[i] = b.count(str(i))
- for i in range(9, -1, -1):
- print(str(i) * min(x[i], y[i]), end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement