Started on 36
This commit is contained in:
19
36/main.py
Normal file
19
36/main.py
Normal file
@@ -0,0 +1,19 @@
|
||||
'''
|
||||
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.
|
||||
|
||||
Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
|
||||
|
||||
(Please note that the palindromic number, in either base, may not include leading zeros.)
|
||||
'''
|
||||
|
||||
def isPalindrome(n):
|
||||
return n == int(str(n)[::-1])
|
||||
|
||||
def main():
|
||||
print("Hello this is Patrick")
|
||||
|
||||
for n in range(1000000):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user