Initial commit

This commit is contained in:
Kevin Keogh
2018-07-02 15:45:49 -04:00
parent 60b3954a3b
commit fd817f8811
28 changed files with 809 additions and 0 deletions

17
problem-32.py Normal file
View File

@@ -0,0 +1,17 @@
import itertools
from pprint import pprint
MAX_NUM = int(999999999**0.5) + 1
results = []
for i in range(MAX_NUM):
for j in range(MAX_NUM):
num = i * j
if ''.join(sorted(str(i) + str(j) + str(num))) == '123456789':
results.append((i, j, num))
pprint(results)
print(len(results))
print(sum(set(x[2] for x in results)))