Answer please…….
Examples:
Input: N = 136
Output: 123
Explanation:
The numbers formed by repeatedly removing the last digit of 123 are {123, 12, 1}.
Therefore, the sum of these numbers = 123 + 12 + 1 = 136( = N).N = 107Input:Output: 98
Explanation:
The numbers formed by repeatedly removing the last digit of 98 are {98, 9}.
Therefore, the sum of these numbers = 98 + 7 = 107( = N).
Approach: The approach is based on the following observations: