Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
"Max Digit" solution in Uncategorized category for Max Digit by Mateusz_Wryszcz
def max_digit(value: int) -> int:
digits = [int(num) for num in str(value)]
digits.sort(reverse = True)
return digits[0]
print("Example:")
print(max_digit(10))
assert max_digit(0) == 0
assert max_digit(52) == 5
assert max_digit(634) == 6
assert max_digit(1) == 1
assert max_digit(10000) == 1
print("The mission is done! Click 'Check Solution' to earn rewards!")
Dec. 19, 2022