def deep(a, b):
if a==b:
return a
elif a>b:
return deep(int(a/2),int(b))
elif a<b:
return deep(int(a),int(b/2))
a, b = input().split(' ')
a = int(a)
b = int(b)
result = deep(a, b)
print(result)
알고리즘
def deep(a, b):
if a==b:
return a
elif a>b:
return deep(int(a/2),int(b))
elif a<b:
return deep(int(a),int(b/2))
a, b = input().split(' ')
a = int(a)
b = int(b)
result = deep(a, b)
print(result)