harbor run -t openthoughts/tasktrove-mix-h1-struggle-zone-v2-mix-h1-struggle-zone-1941
harbor download openthoughts/tasktrove-mix-h1-struggle-zone-v2-mix-h1-struggle-zone-1941
Your task is to find the maximum possible sum of the digits (in base 10) of a positive integer that is not greater than a given integer ( N ).
Input:
N = 15
Output:
6
Explanation: The integers ≤ 15 and their digit sums are:
N = 99
18
Explanation: The maximum digit sum is 18 from the integer 99.
Please implement your solution in the /app/ directory.
/app/