def maxNum(num_end:int) -> int: if num_end < 1: return 0 else: return num_end%10 + maxNum(num_end//10) print(maxNum(0))