Finished existing ipython solutions to python. Ready to continue in pure python.

This commit is contained in:
2019-07-18 14:23:44 -04:00
parent c624e6ac52
commit 45e0cd8a78
13 changed files with 425 additions and 25 deletions

View File

@@ -1,8 +1,22 @@
from lib_misc import get_digit_count
def get_n_digit_positive_integers(n):
r = []
i = 1
while True:
if get_digit_count(i ** n) == n:
r.append(i ** n)
if get_digit_count(i ** n) > n:
return r
i += 1
def euler_063():
return 0
s = sum([len(get_n_digit_positive_integers(n)) for n in range(1, 1000)])
return s
if __name__ == "__main__":
print("e063.py: " + str(euler_063()))
assert(euler_063() == 0)
assert(euler_063() == 49)