Professional Documents
Culture Documents
Example:
Input: n = 50; m = 100
Output: 99
Input: n = 50; m = 98
Output: 98
Explanation:
There are two numbers with the maximum digit sum: 98 and 89.
Since 98 > 89, so 98 is the answer.