Add more solutions

This commit is contained in:
Kevin Keogh
2019-02-03 14:21:43 -05:00
parent 4ef32a7e04
commit fbebd6c05f
7 changed files with 147 additions and 0 deletions

23
problem-55.py Normal file
View File

@@ -0,0 +1,23 @@
def get_palindrome(num):
return int(str(num)[::-1])
def is_palindrome(num):
return get_palindrome(num) == num
if __name__ == '__main__':
results = []
for i in range(10, 10000):
num = i + get_palindrome(i)
counter = 0
while counter < 50 and not is_palindrome(num):
num += get_palindrome(num)
counter += 1
if not is_palindrome(num):
results.append(i)
print(len(results))