Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Champernowne Word by eugene100372
def counting_series(n: int) -> int:
digits=[1]
num=1
while len(digits)<=n:
num+=1
digits+=[int(digit) for digit in str(num)]
return digits[n]
print("Example:")
print(counting_series(1))
# These "asserts" are used for self-checking
assert counting_series(0) == 1
assert counting_series(10) == 0
assert counting_series(100) == 5
print("The mission is done! Click 'Check Solution' to earn rewards!")
Oct. 17, 2024