Advertisement
nq1s788

Untitled

Jun 29th, 2024
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. a = input()
  2. b = input()
  3. x = [0] * 10
  4. y = [0] * 10
  5. for i in range(10):
  6.     x[i] = a.count(str(i))
  7.     y[i] = b.count(str(i))
  8. for i in range(9, -1, -1):
  9.     print(str(i) * min(x[i], y[i]), end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement