All the positive perfect cubes 1, 8, 27, 64, 125, 216, 343, ... are written in accordance with strictly ascending order of magnitude and without the commas, resulting in the following infinite string:
182764125216343...........
Reading left to right, determine the 2023rd digit in the abovementioned string.
The 2023rd digit is 8
cubes = ''
for n in range(1,350):
cubes += str(n**3)
print((cubes)[2022])
(python lists are zero based, so subscript 2022 is the 2023rd digit)
|
Posted by Larry
on 2023-12-12 09:39:53 |