Given two positive integers A and B, the task is to print the distinct digits in descending order, which are not common in the two numbers.
Examples:
Input:_ A = 378212, B = 78124590_
Output:_ 9 5 4 3 0_
Explanation:_ All distinct digits present in the two numbers are {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. The digits {1, 2, 6, 7} are common in both numbers._
_Input: _A = 100, B = 273
Output:_ 7 3 2 1 0_
Explanation:_ All distinct digits present in the two numbers are {0, 1, 2, 3, 7}. The digits {0, 1, 2, 3, 7} are common in both numbers._
**Approach: **The problem can be solved using sets, and lists in python. Follow the steps below to solve the problem:
#sorting #number-digits #python list-programs #python-set