题解 | #二叉树#
二叉树
https://www.nowcoder.com/practice/f74c7506538b44399f2849eba2f050b5
def cal(m,n): if m>n: return 0 else: return cal(2*m,n)+cal(2*m+1,n)+1 while True: try: m,n = map(eval,input().strip().split()) if (m,n) == (0,0): continue print(cal(m,n)) except EOFError: break