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())

lis = [X]

while lis[-1]*2 <= Y:
  lis.append(lis[-1]*2)
#print(lis)
print(len(lis))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC083 C - Multiple Gift
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())
ans = 1
while True:
    if Y < 2*X:
        break
    X += X
    ans += 1
print(ans)

Submission status: Accepted

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

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 = [int(i) for i in input().split()]
cnt = 0
while(X <= Y):
    X = X*2
    cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt=0
while Y>=X:
  X*=2
  cnt+=1
print(cnt)

Submission status: Accepted

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

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:
x,y = map(int,input().split())
n=y/x
cnt=0
while(y>=x):
    cnt+=1
    x=x*2
if cnt==0:
    cnt=1
print(cnt)

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    X,Y = map(int, input().split())
    ans = 0
    num = X
    while num <= Y:
        num *= 2
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
k = Y//X
print(k.bit_length())

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

x, y = map(int, sys.stdin.readline().strip().split(" "))

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

print(ans)

Submission status: Accepted

Solution code:
import math

if __name__ == '__main__':
    X, Y = map(int, input().split())
    # print(int(math.log2(Y//X)+1))
    print((Y//X).bit_length())
    # ans = 0
    # while X <= Y:
    #     ans += 1
    #     X *= 2
    # print(ans)

Submission status: Accepted

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

now = X
ans = 0 
while  now <= Y:
    ans += 1
    now *= 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:
if __name__ == '__main__':
    X, Y = map(int, input().split())
    A = []
    A.append(X)
    while 2*A[-1] <= Y:
        A.append(2*A[-1])
    print(len(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

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())
cnt = 0
while X<= Y:
  X*=2
  cnt+=1 
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


x, y = LI()
cnt = 0


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



print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int, input().split())
# ret = int(math.log(Y/X)/math.log(2))+1
ret = 0
while X <= Y:
    ret += 1
    X *= 2

print(ret)

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:
def q71(X, Y):
    x = X
    i = 0
    while x <= Y:
        x = x*2
        #print(x)
        i += 1
    return i

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

Submission status: Accepted

Solution code:
def q71(X, Y):
    x = X
    i = 1
    while x <= Y:
        x = x*2
        #print(x)
        i += 1
    return i - 1

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

Submission status: Accepted

Solution code:
def check():
    X, Y = [int(i) for i in input().split(' ')]
    count = 0
    
    while X <= Y:
        X *= 2
        count += 1
    print(count)
check()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def sumCifre(n):
	sum = 0
	while n > 0:
		sum = sum + n % 10
		n //= 10
	return sum
	
def main():
	linie = input()
	vector = [int(x) for x in linie.split()]	
	x = vector[0]
	y = vector[1]
	imp = y // x
	nr = 0
	while imp > 1:
		imp //= 2
		nr += 1
	print(nr + 1)
 
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = x
cnt = 1

while a * 2 <= y:
    a *= 2
    cnt += 1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
import math

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

Submission status: Accepted

Solution code:
#入力
x, y = map(int, input().split())
for i in range(100):
    t = x * 2**i
    if t > y:
        break
        
print(i)

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


X, Y =  map(int, sys.stdin.readline().split())

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
length = Y // X
counter = 0

while length > 0:
    counter += 1
    length = length // 2

print(counter)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if X > Y:
	cnt -= 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
n = X
cnt = 0
while n <= 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
    Y = Y // 2
print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from statistics import *
from collections import *
from operator import itemgetter
from fractions import gcd
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
def lcm(x, y):
    return (x * y) // gcd(x, y)


x, y = na()
if x * 2 > y:
    print(1)
else:
    ct = 2
    num1 = x
    num2 = x*2
    while True:
        g = lcm(num1, num2)
        if g * 2 <= y:
            ct += 1
            num1 = num2
            num2 = g * 2
        else:
            break
    print(ct)

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

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

print(count)

Submission status: Accepted

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

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())
A = []
while X <=Y:
    A.append(X)
    X = X*2
print(len(A))

Submission status: Accepted

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

p = X
count = 1

while 1:
    p = p * 2
    if p > Y:
        break
    count += 1

print(count)

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())

a = []
t = x
while True:
    if t > y:
        break
    a.append(t)
    t *= 2

print(len(a))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import math


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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

A = X
result = 1

for i in range(10000):
    A = A*2
    
    if A > Y:
        break
        
    result = result + 1
    
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 1
while True:
    x *= 2
    if x > y:
        break
    count += 1
print(count)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    x, y = LI()
    count = 0
    while x <= y:
        x *= 2
        count += 1
    print(count)
main()

Submission status: Accepted

Solution code:

import sys
def input():
	return sys.stdin.readline().strip()

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

print(num)

Submission status: Accepted

Solution code:
def main():
    X, Y = map(int, input().split())
    A = X
    l = 1
    while A*2 <= Y:
        A *= 2
        l += 1
    return l

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())
sys.setrecursionlimit(10 ** 9)


def main():
    X, Y = MAP()
    print(len(bin(Y//X)) - 2)


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())

cnt = x
ans = 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
tmp = X
while tmp <= Y:
    tmp *= 2
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
X,Y = [int(x) for x in stdin.readline().rstrip().split()]
ans = 0
while X <= Y:
    X = X*2
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
X, Y = [int(_) for _ in input().split()]
tmp = X
ans = 0
while tmp <= Y:
    ans += 1
    tmp *= 2
print(ans)

Submission status: Accepted

Solution code:
import math

X, Y = [int(_) for _ in input().split()]
tmp = math.floor(math.log2(Y / X))
if (2 ** tmp) * X > Y:
    tmp -= 1
print(tmp + 1)

Submission status: Accepted

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

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

print(len(ans))

Submission status: Accepted

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

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:
if __name__ == "__main__":
    # 入力
    X,Y = map(int, input().split())
    ans = 0
    n = X
    while n <= Y:
        ans += 1
        n = n*2
    print(ans)

Submission status: Accepted

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

while flag==0:
    if X*2>Y:
        break
    X=X*2
    count+=1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x, y = map(int, input().split())
ans = 0
while x <= y:
    x *= 2
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
# Multiple Gift
import math
x, y = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import log,floor
x,y = map(int,input().split())
cnt = 1
while x <= y:
    #print(x,cnt)
    x = x * 2
    if x <= y:
        cnt += 1
    else:
        print(cnt)
        break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
x,y = list(map(int,input().split()))
ret = 1
while True:
    x *= 2
    if x <= y:
        ret += 1
    else:
        break
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

temp = y//x

ind = 1
t = 1
while True:
    t *= 2
    ind += 1
    if t >temp:
        break
print(ind-1)

Submission status: Accepted

Solution code:


x, y = map(int,input().split())
s=0
ans=0

while x*(2**s)<=y:
    ans +=1
    s +=1
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())
ans = 1
while True:
  if 2 * x > y:
    print(ans)
    break
  else:
    x *= 2
    ans += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
num = X
lists = [X]
while 1:
    num *= 2
    if num <= Y:
        lists.append(num)
    else:
        break
print(len(lists))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc083/tasks/arc088_a
# C - Multiple Gift
import math

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

# 一番小さい数でyが限界になるまで倍々していけばよい？
target_list = [x]
number = x

while number * 2 <= y:
    target_list.append(number * 2)
    number = number * 2

# print(target_list)
ans = len(target_list)
print(ans)

Submission status: Accepted

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

    cnt = 0
    tmp = X
    for i in range(10**8):
        if tmp > Y:
            break 
        tmp = tmp * 2
        cnt += 1
    
    print(cnt)

main()

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
A = []
a = x
while True:
    A.append(a)
    a *= 2
    if a > y:
        break
print(len(A))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, fractions, itertools


def solve(X: int, Y: int):
    counter = 1
    while(X <= Y):
        X *= 2
        counter += 1
    print(counter-1)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = 0
while a <= b:
    c += 1
    b //= 2
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
XS = []
X_next = X
while (X_next <= Y):
  XS.append(X_next)
  X_next *= 2
print(len(XS))

Submission status: Accepted

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


def count(n, x, counter):
    if n < x:
        return counter
    else:
        return count(n, x * 2,counter+1)
    
print(count(y, x, 0))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(p)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = [x]

while l[-1] < y:
    l.append(l[-1] * 2)

if l[-1] > y:
    l.pop()

print(len(l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b, c, d = LI()
    a += b
    c += d
    ans = ["Left", "Right"]
    if a == c:
        print("Balanced")
        return
    print(ans[a < c])
    return

#B
def B():
    n, a, b = LI()
    ans = 0
    for i in range(1, n + 1):
        if a <= sum(list(map(int, list(str(i))))) <= b:
           ans += i
    print(ans) 
    
    return

#C
def C():
    x, y = LI()
    ans = 0
    while x <= y:
        ans += 1
        x *= 2
    print(ans)
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    C()

Submission status: Accepted

Solution code:
import copy
import sys
import math

def main():
	x,y = map(int,input().split())
	ans=0
	while x<=y:
		x *= 2
		ans+=1
	if(x==y): print(ans+1)
	else: print(ans)


def listtodict(a):
	b = {}
	for i in a:
		try:
			b[i] += 1
		except:
			b[i] = 1
	return b

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

main()

Submission status: Accepted

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

for i in range(300):
    if X * 2**i > Y:
        ans = i
        break
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#### import ####
import sys
sys.setrecursionlimit(10**7)
import math
from collections import defaultdict

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))

#################

X,Y = II()
counter = 1
while 1:
  X = 2*X
  if X>Y:
    break
  else:
    counter += 1
    
print(counter)

Submission status: Accepted

Solution code:
x,y=map(int, input().split())
count=0
for i in range(10**9):
    if (2**i)*x<=y:
        count+=1
    else:
        break
print(count)

Submission status: Accepted

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

A = [X]
while A[-1]*2 <= Y:
  A.append(A[-1]*2)

print(len(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def main():
    X,Y = map(int,input().split())
    
    ans = 0
    tmp = X
    while tmp <= Y:
        ans += 1
        tmp = tmp * 2
        
    print(ans)
            	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

import logging

# logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)

import math


def resolve():
    X, Y = [int(x) for x in sys.stdin.readline().split()]

    logger.debug('{} {}'.format(X, Y))

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

    print(count)


if __name__ == "__main__":
    resolve()

# AtCoder Unit Test で自動生成できる, 最後のunittest.main は消す
# python -m unittest template/template.py で実行できる
# pypy3 -m unittest template/template.py で実行できる

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 20"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """25 100"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """314159265 358979323846264338"""
        output = """31"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """1 2"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_5(self):
        input = """3 3"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_6(self):
        input = """999999999999999999 1000000000000000000"""
        output = """1"""
        self.assertIO(input, output)

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:
x, y = map(int, input().split())
cnt = 0
ans = x
while y >= ans:
    ans *= 2
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC83 C

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

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