Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Brute force solution in Clear category for Champernowne Word by amandel
def counting_series(n: int) -> int:
# Totally stupid solution. Stalls for large n
return int(''.join(str(i) for i in range(1,10**len(str(n))))[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!")
Jan. 13, 2024