Skip to content

Commit

Permalink
add euler036 solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kailanefelix committed Sep 25, 2021
1 parent 8454991 commit 8c2094b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions euler0XX/euler036.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
total = 0
for number in range(1_000_000):
as_str = str(number)
if as_str == as_str[::-1]:
as_bin = f'{number:b}'
if as_bin == as_bin[::-1]:
total = total + number

print(total)

0 comments on commit 8c2094b

Please sign in to comment.