[UVA] 263 - Number Chains
Number Chains
Given a number, we can form a number chain by
arranging its digits in descending order arranging its digits in ascending order subtracting the number obtained in (2) from the number obtained (1)
to form a new number and repeat these steps unless ...