12 lines
193 B
Python
12 lines
193 B
Python
import math
|
|
|
|
def gen():
|
|
yield 1
|
|
for i in range(2, 10):
|
|
n = 1
|
|
while int(n * math.log10(i)) + 1 == n:
|
|
yield i ** n
|
|
n += 1
|
|
|
|
print(len(list(gen())))
|