Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple using //10 solution in Clear category for Number Length by thealfest1
def number_length(a: int) -> int:
digits = 0
while a:
digits += 1
a //= 10
return digits + (not digits) # 0 has 1 digit
Feb. 28, 2020
Comments: