Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Problem 63
total = 0
next_order = 10
length = 1
while True:
result_of_power = 0
base = 1
list_of_powers = []
while result_of_power < next_order:
result_of_power = base**length
list_of_powers.append(result_of_power)
base += 1
for x in list_of_powers:
if len(str(x))==length:
total +=1
print total
print x
next_order *= 10
length += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment