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

13
problem-36.py Normal file
View File

@@ -0,0 +1,13 @@
MAX_NUM = 1000000
if __name__ == '__main__':
results = []
for i in range(MAX_NUM):
rev = int(str(i)[::-1])
binary_i = bin(i)[2:]
rev_binary_i = binary_i[::-1]
if i == rev and binary_i == rev_binary_i:
results.append(i)
print(results)
print(sum(results))