Problem:


Score : 300 points

Problem Statement

As a token of his gratitude, Takahashi has decided to give his mother an integer sequence.
The sequence A needs to satisfy the conditions below:

A consists of integers between X and Y (inclusive).

For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i.

Find the maximum possible length of the sequence.

Constraints

1 \leq X \leq Y \leq 10^{18}

All input values are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

Print the maximum possible length of the sequence.

Sample Input 1

3 20

Sample Output 1

3

The sequence 3,6,18 satisfies the conditions.

Sample Input 2

25 100

Sample Output 2

3

Sample Input 3

314159265 358979323846264338

Sample Output 3

31



Sample input:
3 20


Sample output:
3

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

for i in range(62):
	if 2**i > Y//X:
		print(i)
		break

Submission status: Accepted

Solution code:
x, y = [int(v) for v in input().split()]

ans = 0
a = x
while a <= y:
    a *= 2
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))

k = a[1]
i = 2
l = a[0]
while True:
  l *= 2
  if k < l:
    break
  i += 1
print(i-1)

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8:
"""
X,Yの区間は[1, pow(10,18)]であり、全探索すると日が暮れる。
厳密には、区間[X, Y]のすべてを検証する必要はないはずで、
[X, 2*X]でいいはずである。たぶん。

"""


def main():
    X, Y = map(int, raw_input().split())
    ans = 0
    temp = 0

    X2 = 2 * X
    ct = 0
    for i, _ in enumerate(xrange(X2), X):
        ct += 1
        n = i
        while n <= Y:
            temp += 1
            n *= 2

        ans = max(ans, temp)
        temp = 0
        if ct == 400000:
            break

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
cnt = 0
while X <= Y:
  cnt += 1
  X *= 2
print(cnt)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

k = 0
while X <= Y:
    X *= 2
    k += 1
print(k)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
count = 0
while True:
    if X > Y:
        break
    count += 1
    X *= 2
print(count)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

if __name__ == "__main__":
    X, Y = list(map(int, input().split()))

    #implements
    # X*2*n < Y を満たす最大のnは？
    ans = 1
    while True:
        X = X*2
        if X > Y:
            break
        ans += 1
    print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

# X = 25
# Y = 100

ans = 1

while True:
    if X*2 <= Y:
        X *= 2
        ans += 1
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
cnt = 1
while True:
    X *= 2
    if X <= Y:
        cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

ans = 0
while (x <= y):
    ans += 1
    x *= 2

print (ans)

Submission status: Accepted

Solution code:
import math
X, Y = list(map(int, input().split()))
count = 0
while X <= Y:
    X = X * 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
count=0
while 1:
    if x>y:break
    x *= 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
x, y = list(map(int, input().split()))

i = 1
while True:
    x = 2 * x
    if x > y:
        break

    i += 1

print(i)

Submission status: Accepted

Solution code:
x,y = (int(i) for i in input().split())
count = 0
while x <= y:
    x *= 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
X, Y=map(int, input().split())
ans=0
while 1:
    X*=2
    ans+=1
    if X>Y:
        break
print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

count = 0
ai = X
a  = 0
while a <= Y:
    a = ai * 2
    count +=1
    ai = a
print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    X, Y = map(int, input().split())

    ans = 0

    while X <= Y:
        X *= 2
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

ans = 0
while X <= Y:
  ans += 1
  X = X * 2
    
print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
i = X
cnt = 0
while True:
    if Y < i:
        break
    i *= 2
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
count=1
while True:
    X*=2
    if X>Y: break
    else: count+=1
print(count)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

i = 0
while True:
    if a > b:
        break
    i += 1
    a *= 2
print(i)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
res = 0
while x<=y:
    x *= 2
    res += 1
print(res)

Submission status: Accepted

Solution code:
x, y = [int(i) for i in input().split()]

ans = 0

while x <= y:
    ans += 1
    x *= 2

print(ans)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
ans = 0
while x <= y:
  ans += 1
  x *=2
print(ans)

Submission status: Accepted

Solution code:

X,Y = map(int, input().split())

res = X
seq = [X]

while res*2 <= Y:
    res *= 2
    seq.append(res)

print(len(seq))

Submission status: Accepted

Solution code:
X,Y =map(int,input().split(' '))
for i in range(100):
    X *= 2
    if X > Y:
        print(i+1)
        exit()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 10 03:18:11 2018

@author: Yuki
"""

X, Y = map(int, input().split())


cnt = 0
tmp_x_multi = X * 1
while True:
    if tmp_x_multi<=Y:
        cnt += 1
        tmp_x_multi *= 2
    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
cnt=0
while x<=y:
    x*=2
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A,B=map(int,input().split())
cnt=1
for i in range(100):
    if A*2<=B:
        cnt+=1
        A=A*2
    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
a = 1
while y >=2*x:
    a += 1
    x = 2*x
print(a)

Submission status: Accepted

Solution code:
x, y = map(int, input().split(" "))

n = x
count = 0
while n <= y:
	n *= 2
	count += 1
print(count)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
cnt = 0
for i in range(10 ** 18):
    ai = X * 2 ** i
    if X <= ai <= Y:
        cnt += 1
    else:
        break
print(cnt)

Submission status: Accepted

Solution code:
x, y = map(int,input().split())
ans = 0
while x <= y:
    ans += 1
    x *= 2

print(ans)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())

n = 0
while X*(2**n) <= Y:
    n += 1
    if X*(2**n) > Y:
        print(n)

Submission status: Accepted

Solution code:
x,y = map(int, input().split(" "))
a = [x]
idx = 0

while True:
    if idx == 0:
        idx += 1
    elif a[idx-1]*2 <= y:
        a.append(a[idx-1]*2)
        idx += 1
    else:
        break

print(len(a))

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
a = [x]
idx = 0
while True:
    t = a[idx] * 2
    if t <= y:
        a += [t]
        idx += 1
    else:
        break
print(len(a))

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-

def main():
    x, y = map(int, input().split())
    cnt = 1
    while True:
        x *= 2
        cnt += 1
        if x > y:
            break
    print(cnt - 1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

n = X
cnt = 1 if X <= Y else 0

while n*2 <= Y :
    n *= 2
    cnt += 1
    
print(cnt)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
count=0
while X <=Y:
    count+=1
    X*=2
print(count)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
c=0
while x<=y:
    x*=2
    c+=1
print(c)

Submission status: Accepted

Solution code:
X, Y = map( int, input().split())
ans = 1
now = X
Flag = True
while Flag:
    now = 2*now
    if now <= Y:
        ans += 1
    else:
        Flag = False
print(ans)

Submission status: Accepted

Solution code:
(X, Y) =list(map(int, input().split(" ")))

print(len(str(bin(Y // X)))-2)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    X, Y = list(map(int, input().split()))
    counter = 0

    while True:
        if X <= Y:
            counter += 1
            X = X*2
        else:
            break

    print(counter)

Submission status: Accepted

Solution code:
x, y = list(map(int, input().split()))
ans = 0
while x<=y:
  ans+=1
  x *= 2
print(ans)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
ans = 0
while X <= Y:
    X *= 2
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
i = 1
while True:
    if X * pow(2, i) <= Y:
        i += 1
    else:
        print(i)
        break

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
tmp = X
ans = 0
while tmp <= Y:
    tmp *= 2
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
cnt=0
while A<=B:
    A*=2
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
def main():
    # input
    X, Y = map(int, input().split())
    

    # devide by 2
    res = X
    ans = 0
    while res <= Y:
        res *= 2
        ans += 1
    
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x,y = map(int, input().split())

a = x # A[i]
for i in range(1,70):
            
    if (i==1 and a<y) or a*2 <= y: 
        a *= 2 # A[i+1]
        continue
    else: break

print(i)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())

ans = 1

while True:
	if  X * (2 ** ans) <= Y:	
		ans += 1
	else:
		break

print(ans)

Submission status: Accepted

Solution code:
while True:
    A = []
    s = 0
    a = input().split()
    X, Y = list(map(int,list(a)))
    if X > Y or Y > 10**18 or X < 1:
        continue
    A.append(X)
    while True:
        A.append(A[len(A)-1]*2)
        if A[len(A)-1] > Y:
            break
    s = len(A) - 1
    print(s)
    break

Submission status: Accepted

Solution code:
X,Y=list(map(int, input().split()))

item=X
length=1
while item<=Y:
    item *= 2
    length+=1
length -= 1
print(length)

Submission status: Accepted

Solution code:
x,y = input().split()
X = int(x)
Y = int(y)

A = []
now_num = X
next_num = X*2
while(now_num <= Y):
	A.append(now_num)
	now_num = int(next_num)
	next_num = int(now_num*2)
print(len(A))

Submission status: Accepted

Solution code:
from itertools import count, takewhile
 
x, y = map(int, input().split())
 
print(max(takewhile(lambda i: x * (2**i) <= y,  count())) + 1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 20 16:39:29 2018

@author: Yuya
"""

X,Y=map(int,input().split())

count = 0

while X<=Y:
    X *= 2
    count += 1

print(count)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 1
while X*2 <= Y:
    X *= 2
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
from itertools import count, takewhile

x, y = map(int, input().split())

print(sum(1 for _ in takewhile(lambda z: z <= y, (x*(2**i) for i in count()))))

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

n = 10 ** 18
A = [1]
i = 0
while A[i] < n:
    A.append(A[i] * 2)
    i += 1

Y //= X
X = 1

ans = 0
for a in A:
    if X <= a <= Y:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

X, Y = map(int, input().split())

ans = 0
# Xを始点にしてYを超えるまで2倍していく
while X <= Y:
    ans += 1
    X *= 2

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

X, Y = map(int, input().split())

ans = 0
num = X
# Xを始点にしてYを超えるまで2倍していく
while num <= Y:
    ans += 1
    num *= 2

print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
res = 0
tmp = X
while tmp <= Y:
    tmp = tmp * 2
    res += 1
print(res)

Submission status: Accepted

Solution code:
nums = list(map(int, input().split()))
i = 0
mi = int(nums[0])
ma = int(nums[1])
k = mi
while k <= ma:
  k = k*2
  i += 1
print(i)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
ans = 0
while X<=Y:
    ans+=1
    X*=2
print(ans)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
count = 1
for i in range(10**5):
    A = A*2
    if A > B:
        break
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
(x, y) = list(map(int, input().split()))
res = 0
tmp = x
while tmp <= y:
    res += 1
    tmp = tmp * 2
print(res)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
cnt = 0
while X<=Y:
    X *= 2
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import math
X,Y = map(int,input().split())
judge =True
i = 1
ans = 0
while judge:
    # print(X)
    if X<=Y:
        ans+=1
    else:
        judge = False
    i += 1
    X = X*2
print(ans)

Submission status: Accepted

Solution code:
X,Y=[int(i) for i in input().split()]

lenCount = 0
while X <= Y:
    X *= 2
    lenCount += 1

print(lenCount)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
i = 0
while X * 2**i <= Y:
    i += 1

print(i)

Submission status: Accepted

Solution code:
a = input().split()
counter = 0

element = int(a[0])

while element <= int(a[1]):
    element *= 2
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 1

while True:
    if x * 2**ans > y:
        print(ans)
        exit()
    ans += 1

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())

AZ=X
count=0


while AZ<=Y:
    count+=1
    AZ*=2
    
print(count)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
count = 1

while True:
    if X * 2 <= Y:
        count += 1
        X *= 2
    else:
        break

print(count)

Submission status: Accepted

Solution code:

X, Y = map(int, input().split())

t = X
count = 1
while True:
    t *= 2
    if t > Y:
        break
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
a = 0
while x <= y:
    x *= 2
    a += 1

print(a)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
cnt = 0
while(x <= y):
    x *= 2
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
x, y = [int(i) for i in input().split()]

num = x
count = 0
while(num <= y):
    count += 1
    num *= 2

print(count)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
cnt = 1
X *= 2
while X <= Y:
    X *= 2
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
ct=0
while X<=Y:
    ct+=1
    X*=2
print(ct)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
count = 0
while(y>=x):
    x *= 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
x,y = map(int, raw_input().split())
a = x
ct = 0
while a <= y:
  ct += 1
  a *= 2
print ct

Submission status: Accepted

Solution code:
def c_multiple_gift(X, Y):
    ans = 1  # A_1=Xとなる長さ1の数列が必ず作れる
    while X <= Y:
        X *= 2  # A_{i+1} = 2A_iとする
        ans += 1
    ans -= 1  # whileの最後でYを超える要素を1つ入れたので除く
    return ans 

X,Y = [int(i) for i in input().split()]
print(c_multiple_gift(X, Y))

Submission status: Accepted

Solution code:
X,Y = map(int, input().split())
i = 0
ans = 0
while (X*(2**(i))<= Y):
    ans += 1
    i += 1
print(ans)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

ans = 0
num = x
while num <= y:
    ans += 1
    num *= 2
print(ans)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
ans = 0
while X <= Y:
    ans += 1
    X *= 2
print(ans)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

res = 0
while True:
    if x > y:
        break
    x *= 2
    res += 1

print(res)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from itertools import product
def inpl(): return map(int, input().split())

X, Y = inpl()
ans = 0
A = X
while A <= Y:
    ans += 1
    A *= 2

print(ans)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
ans=1
Flag=True
while Flag:
    X=X*2
    if X<=Y:
        ans+=1
    else:
        Flag=False
print(ans)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
a=x
cnt=0
while a<=y:
    a*=2
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

nums = []
ap = nums.append

while True:
    if x > y:
        break

    ap(x)
    x *= 2

print(len(nums))

Submission status: Accepted

Solution code:
line = input().split(' ')
X = int(line[0])
Y = int(line[1])

c = 1
count = 1
while 1:
	if (Y > 2*c*X):
		c *= 2
		count += 1
	elif (Y == 2*c*X):
		count += 1
		print(count)
		break
	elif (Y < 2*c*X):
		print(count)
		break

Submission status: Accepted

Solution code:
x, y = (int(i) for i in input().split())
tmpx = x
count = 0
while tmpx<=y:
    tmpx = tmpx * 2
    count = count + 1

print(count)

Submission status: Accepted

Solution code:
x, y = map(int, input().split(" "))
s = y//x
a = bin(s)
print(len(a)-2)

Submission status: Accepted

Solution code:
x, y = [int(x) for x in input().split()]
size = int(y//x).bit_length()
print(size)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
tot = 0
i = 0
while X <= Y:
    X = X*2
    tot += 1
print(tot)

Submission status: Accepted

Solution code:
X, Y = [int(elem) for elem in input().split(' ')]

A_list = [X]
while True:
    num = A_list[-1] * 2
    if num <= Y:
        A_list.append(num)
    else:
        break

print(len(A_list))

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
n=0
while(2**n<=y//x):
    n+=1
print(n)

Submission status: Accepted

Solution code:
l=input().split()
x, y=int(l[0]), int(l[1])
t=y//x
res=0
while t:
    t>>=1
    res+=1
print(res)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
cnt = 0
while x <= y:
    x *= 2
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
ans=[]
while x<=y:
    ans.append(x)
    x*=2
print(len(ans))

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))
x,y = l[0],l[1]
a = 0
z = x
while z <= y:
    z *= 2
    a += 1
print(a)

Submission status: Accepted

Solution code:
def main():
    X, Y = map(int, input().split())

    num = X 
    ans = 0

    while(True):
        num *= 2
        ans += 1

        if num > Y :
            break

    print(ans)

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
c=0
while x<=y:
  c+=1
  x*=2
print(c)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 0
t = X
while t <= Y:
    t *= 2
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
def gcd(a, b):
    r = a % b
    while r != 0:
        a, b = b, r
        r = a % b

    return b


x, y = map(int, input().split())
a = []
i, g = 0, 0

while True:
    if len(a) == 0:
        g = x
    elif len(a) == 1:
        g = x * 2
    else:
        g = a[i-1]*a[i-2]/gcd(a[i-1], a[i-2])
        if g == a[i-1]:
            g *= 2

    if g > y:
        break
    else:
        a.append(g)
        i += 1

print(len(a))

Submission status: Accepted

Solution code:
from math import log
n = list(map(int,input().split()))
x, y = n[0],n[1]
for i in range(0,100):
  if x * 2 ** i > y:
    print(i)
    quit()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

x, y = map(int, input().split())

count = 0
while(x <= y):
    count += 1
    x *= 2
print(count)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
A,L = X,0
while A <= Y:
    L += 1
    A *= 2
print(L)

Submission status: Accepted

Solution code:
from math import log, floor

def formula(x, y):
    # This fails because of precision issues: log((2 ** 59) - 1) = 59
    return 1 + floor(log(y / x, 2))

def naive(x, y):
    count = 0
    n = x
    while n <= y:
        count += 1
        n *= 2
    return count
        

if __name__ == '__main__':
    x, y = map(int, input().split())
    print(naive(x, y))

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))

a = l[0]
b = l[1]

c = 1

while a * 2 <= b:
    a = a*2
    c = c+1
    
print(c)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
counter = 0
A = X
while A <= Y:
    A *= 2
    counter += 1
print(counter)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
hold = x
count = 0
while hold <= y:
    count += 1
    hold *=2
print(count)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
c = 0
while x * (2 ** c) <= y:
    c += 1
print(c)

Submission status: Accepted

Solution code:
x,y=map(int, input().split())
count=0
while x<=y:
    count+=1
    x*=2
print(count)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
i=0
while Y>=X*(2**i):
    i+=1
print(i)

Submission status: Accepted

Solution code:
import bisect


def calc(X, Y):
    dic = dict([(X * (2**x), x) for x in range(80)])
    ret = bisect.bisect(list(dic.keys()), Y)

    return ret


def calc2(X, Y):
    cnt = 0
    tmp = X
    while tmp <= Y:
        tmp *= 2
        cnt += 1
    return cnt


def main():
    X, Y = list(map(int, input().split()))
    print(calc2(X, Y))
    # print(calc(X, Y))


if __name__ == '__main__':
    main()
    # import random
    # for i in range(3000000):
    #     x = random.randint(1, 1000000000000000000)
    #     y = random.randint(x, 1000000000000000000)
    #     if (calc(x, y) != calc2(x, y)):
    #         print(x, y)

Submission status: Accepted

Solution code:
x, y = list(map(int, input().split()))

count = 1
curr_num, next_num = x, x*2
multiplier = 2
while next_num <= y:
    if next_num%curr_num == 0:
        count += 1
        multiplier = 2
        curr_num = next_num
    else:
        multiplier += 1
    next_num = curr_num * multiplier

print(count)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
c = 0
k = x
while k <= y: 
    c += 1
    k *= 2
print(c)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
a=y//x
ans=0
while a//2>0:
    ans+=1
    a//=2
print(ans+1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# AtCoder Beginner Contest
# Problem C

if __name__ == '__main__':
    x, y = map(int, input().split())
    count = 0

    while x * (2 ** count) <= y:
        count += 1

    print(count)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
i=0
while True:
    if 2**i<=y//x<2**(i+1):
        break
    i+=1
print(i+1)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

x,y = na()
count = 1
for _ in range(10000):
    x = x*2
    if x > y:
        break
    count += 1
print(count)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

def f(x, y):
  ans = [x]
  i = 0
  while True:
    temp = ans[i] * 2
    if temp <= y:
      ans.append(temp)
    else:
      break
    i += 1
  return len(ans)

print(f(x, y))

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

num = X
cnt = 1

while num <= Y:
    num *= 2
    cnt += 1

if num > Y:
    cnt -= 1

print(cnt)

Submission status: Accepted

Solution code:
x,y = (int(i) for i in input().split())
answer = 1
while x*2 <= y:
	answer += 1
	x = x*2
print(answer)

Submission status: Accepted

Solution code:
x,y = list(map(int,input().split()))
count = 0
while True:
    if x > y:
        break
    x*=2
    count += 1
print(count)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
t=X
i=1
for i in range(1,X*Y):
    if t*2>Y: break
    else:
        t*=2

print(i)

Submission status: Accepted

Solution code:
X, Y = [int(item) for item in input().rstrip().split(" ")]
 
ans = 0
while(1):
  if X <= Y:
    ans+=1
    X *=2
  else:
    break
print(ans)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
work = 1
for i in range(74):
  tmp = X*pow(2,i)
  if tmp <= Y and Y < tmp*2:
    work +=i
    break
print(work)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
l = []
i = x
while(i<=y):
    l.append(i)
    i *= 2
print(len(l))

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
X_i = X

i = 0
while True:
    if X_i > Y:
        print(i)
        exit()
    X_i *= 2
    i += 1

Submission status: Accepted

Solution code:
import math

X, Y = list(map(int, input().split()))
A = X
count = 0
while Y >= A:
   count += 1
   A = A * 2

print(count)

Submission status: Accepted

Solution code:
X, Y = list(map(int, input().split()))
cnt = 0
while X <= Y :
    X *= 2
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
#coding:utf-8
x, y = list(map(int, input().split()))
count = 0
ai = x
while ai <= y:
    ai *= 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
import numpy as np
from collections import Counter
import collections
round = lambda x:(x*2+1)//2
a = list(map(int,input().split()))
a = np.array(a)
X = a[0]
Y = a[1]
i = 0
while(X<=Y):
  X *= 2
  i+=1
print(i)

Submission status: Accepted

Solution code:
import math
x,y=map(int,input().split())
i=0
while(x<=y):
  x*=2
  i+=1
print(i)

Submission status: Accepted

Solution code:
import math
x,y=map(int,input().split())
i=0
while(x<=y):
  x*=2
  i+=1
print(i)
"""
print(int(math.log(y/x,2)+1))

x*2**n<=y
2**n<=y/x
n<=log(y/x,2)
"""

Submission status: Accepted

Solution code:
x,y= map(int,input().split())
ans=1
while x*2**(ans-1) <= y:
    ans +=1
print(ans-1)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
c=0
while True:
	c+=1
	X*=2
	if X>Y:
		print(c)
		break

Submission status: Accepted

Solution code:
x, y = map(int,input().split())
count = 0
while True:
    count += 1
    x *= 2
    if x > y:
        print(count)
        break

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

def main():
    x, y = map(int, sys.stdin.readline().split())

    cnt = 0
    i = x
    while i <= y:
        cnt += 1
        i += i

    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
input_list = list(map(int,input().split()))
for i in range(61):
    if (input_list[0]*(2**i )<=input_list[1])&(input_list[0]*(2**(i +1))>input_list[1]):
        print(i+1)

Submission status: Accepted

Solution code:

def main():
    x,y = map(int, input().split())

    a = x
    A = [a]

    while a*2 <= y:
        a += a
        A.append(a)


    print (len(A))

if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

X, Y = list(map(int, input().split()))
num = X
count = 0

while num <= Y:
    count += 1
    num *= 2

print(count)

Submission status: Accepted

Solution code:
def main():
    lower, upper = list(map(int, input().split()))

    n_gift = 1

    current_num = lower * 2

    while current_num <= upper:
        current_num *= 2
        n_gift += 1

    print(n_gift)

main()

Submission status: Accepted

Solution code:
x, y = (int(i) for i in input().split())
count = 1 
i = x

while i < y:
    if i*2 <= y:
        count += 1
        i = i*2
    else:
        break
print(count)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
 
num = 0
while x <= y:
    num += 1
    x *= 2
    
print(num)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 1
while(True):
    x *= 2
    if(x <= y):
        ans += 1
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

def main():
    x = []
    x.append(X)
    for i in range(Y):
        a = max(x)
        b = a*2
        if b > Y: return print(len(x))
        x.append(b)

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc083/tasks/arc088_a

"""
import sys
from sys import stdin
input = stdin.readline


def solve(X, Y):
    ans = []

    while X <= Y:
        ans.append(X)
        X *= 2
    # print(*ans)
    return len(ans)


def main(args):
    X, Y = map(int, input().split())
    ans = solve(X, Y)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
from math import pow

X, Y = map(int, input().split())

max_len = 0

while True:
    if X * pow(2, max_len) <= Y:
        max_len += 1
    else:
        break

print(max_len)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 0
for i in range(60):
	if X > Y:
		break
	ans += 1
	X = X * 2
print(ans)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
ans=[x]
for v in range(1,y):
    if 2*ans[v-1] <= y:
        p = ans[v-1]*2
        ans.append(p)
    else:
        break;

print(len(ans))

Submission status: Accepted

Solution code:

import math
X, Y = list(map(int, input().split()))
"""
print(math.ceil(math.log(Y/X+1, 2)))
"""
count = 0
while X <= Y:
    X *= 2
    count += 1
print(count)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
an = x
count = 0
while an <= y:
    an *= 2
    count += 1

print(count)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

Xi = X
i = 0
while Xi <= Y:
    Xi *= 2
    i += 1
print(i)

Submission status: Accepted

Solution code:
 #a = 314159265
#b = 358979323846264338
a, b = map(int, input().split())
count = 1
x = a
#print(x)
while x * 2 <= b:
    x = x * 2
    #print(x)
    count += 1
print(count)

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())

a=X
c=0
while a<=Y:
   c+=1
   a*=2
print(c)

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
l = 0
while x <= y:
    x *= 2
    l += 1
print(l)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
ans = 0;
while x <= y:
    ans+=1
    x*=2;
print(ans)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

ans = 0
while x<=y:
    ans += 1
    x *= 2
print(ans)

Submission status: Accepted

Solution code:


def foo(x, y):
    b = 1
    n = 0
    while b <= y//x:
        b = b << 1
        n += 1
    return n


if __name__ == "__main__":
    x, y = map(int, input().split())
    print(foo(x, y))

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
a = x
i = 0
while a <=y:
    i += 1
    a = a * 2
print(i)