Skip to content

Instantly share code, notes, and snippets.

@yuda110
Created April 27, 2016 09:23
Show Gist options
  • Save yuda110/c6fad4f7bb21b58539b37ef1952c46dd to your computer and use it in GitHub Desktop.
Save yuda110/c6fad4f7bb21b58539b37ef1952c46dd to your computer and use it in GitHub Desktop.
#2진수 구하는 함수 있으면 좋은데
def get_2진수(10진수):
return 2진수
def is_대칭수(num):
if num is 대칭수:
return True
else:
return False
def get_대칭수(range_to):
result_sum = 0
for i in range(range_to):
10진수 = i
2진수 = get_2진수(10진수)
if is_대칭수(10진수)==True and is_대칭수(2진수)==True :
result_sum += 10진수
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment