solve 63 in python
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
def sol():
|
||||||
|
base = 1
|
||||||
|
while base < 10:
|
||||||
|
exponent = 1
|
||||||
|
while exponent <= (digits := len(str(n := base**exponent))):
|
||||||
|
if digits == exponent:
|
||||||
|
yield n
|
||||||
|
exponent += 1
|
||||||
|
base += 1
|
||||||
|
|
||||||
|
|
||||||
|
print(len([n for n in sol()]))
|
||||||
Reference in New Issue
Block a user