sol_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| solution_text
stringlengths 3
618k
| problem_text
stringlengths 0
18.4k
|
---|---|---|---|
s371455270 | p03479 | x, y = map(int, input().split())
ans = 0
while x <= y:
ans += 1
x *= 2
print(ans) | 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 |
s666209963 | p03479 | def main():
x, y = map(int, input().split())
ans = 0
while y >= x:
x *= 2
ans += 1
print(ans)
if __name__ == '__main__':
main() | 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 |
s273168867 | p03479 | x,y=map(int,input().split())
ans = 0
while x<=y:
ans += 1
x *= 2
print(ans) | 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 |
s144355148 | p03479 | x,y = map(int,input().split())
ans = 0
while x <= y:
x *= 2
ans += 1
print(ans) | 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 |
s655463701 | p03479 | x,y = map(int,input().split())
ans = 0
while x <= y:
ans+=1
x =x*2
print(ans) | 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 |
s591112579 | p03479 | x, y = map(int, input().split())
ans = 0
while x <= y :
x = x * 2
ans += 1
print(ans) | 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 |
s631228394 | p03479 | x,y=map(int,input().split())
ans=0
while x<=y:
ans+=1
x=x*2
print(ans) | 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 |
s532205116 | p03479 | import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b)
def lcm(a,b):return (a*b) // fractions.gcd(a,b)
def iin(): return int(input())
def ifn(): return float(input())
def isn(): return input().split()
def imn(): return map(int, input().split())
def fmn(): return map(float, input().split())
def iln(): return list(map(int, input().split()))
def iln_s(): return sorted(iln())
def iln_r(): return sorted(iln(), reverse=True)
def fln(): return list(map(float, input().split()))
def join(l, s=''): return s.join(l)
def perm(l, n): return itertools.permutations(l, n)
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r)
def comb(l, n): return itertools.combinations(l, n)
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5
def m_add(a,b): return (a+b) % MOD
X, Y = imn()
ans = 0
while X <= Y:
X *= 2
ans += 1
print(ans)
| 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 |
s351135968 | p03479 | x, y = list(map(int, input().split()))
ans = 1
while 2*x <= y:
ans += 1
x *= 2
print(ans) | 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 |
s843436314 | p03479 | x,y = map(int,input().split())
d = y//x
ans = 0
while 0 < d:
ans += 1
d //= 2
print(ans) | 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 |
s012897048 | p03479 |
import math
x, y = map(int, input().split())
ans = 0
while x <= y:
x *= 2
ans += 1
print(ans) | 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 |
s171638873 | p03479 | x, y = map(int, input().split())
i = 1
ans = x
while ans <= y:
ans = ans*2
i += 1
print(i-1) | 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 |
s987135918 | p03479 | x, y = map(int, input().split())
s = x
cnt = 0
while s <= y:
s *= 2
cnt += 1
print(cnt)
| 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 |
s110562542 | p03479 | def input_int():
return map(int, input().split())
def one_int():
return int(input())
def one_str():
return input()
def many_int():
return list(map(int, input().split()))
X,Y=input_int()
count=0
while X<=Y:
count+=1
X*=2
print(count) | 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 |
s014282353 | p03479 | import math
x,y=map(int,input().split())
def ans(x,x2,y):
if x>y:
return 0
else:
return ans(x2,x2*2,y)+1
print(ans(x,x*2,y)) | 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 |
s305046816 | p03479 | x, y = map(int, input().split())
count = 1
while True:
x *= 2
if x <= y:
count += 1
else:
break
print(count) | 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 |
s331090897 | p03479 | X, Y = map(int, input().split())
cnt = 0
while X <= Y:
X *= 2
cnt += 1
print(cnt) | 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 |
s637482556 | p03479 | x,y=map(int,input().split())
k=x
cnt = 0
while k<=y:
k*=2
cnt+=1
print(cnt) | 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 |
s196842105 | p03479 | x, y = map(int, input().split())
ans = 0
while x <= y:
x *= 2
ans+=1
print(ans)
| 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 |
s112666759 | p03479 | import sys
input = sys.stdin.readline
X,Y = [int(i) for i in input().split()]
count = 1
while True:
if X * 2 <= Y:
X *=2
count+=1
else :
break
print(count) | 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 |
s972117260 | p03479 | x,y=map(int,input().split())
cnt=0
while x<=y:
x*=2
cnt+=1
print(cnt) | 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 |
s089908774 | p03479 | x,y=map(int,input().split())
n=y//x
ct=0
while n>0:
n//=2
ct+=1
print(ct) | 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 |
s054252916 | p03479 | def main():
X, Y = map(int, input().split())
a = X
count = 0
while a <= Y:
a *= 2
count += 1
print(count)
main() | 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 |
s632157981 | p03479 | x,y = map(int, input().split())
cnt=0
while True:
if x>y:
break
else:
x = x*2
cnt+=1
print(cnt)
| 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 |
s528600573 | p03479 | x, y = map(int,input().split())
ex = y//x
counter = 1
exCount = 1
while True:
if exCount * 2 > ex:
break
else:
counter += 1
exCount *= 2
print(counter)
| 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 |
s114706446 | p03479 | x, y = map(int, input().split())
nx = x*2
if nx > y:
print(1)
else:
i = 2
while nx*2 <= y:
nx = nx*2
i += 1
print(i) | 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 |
s869047724 | p03479 |
x,y = map(int,input().split())
i = 1
while True:
if y >= x * (2**i):
i += 1
else: break
print(i) | 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 |
s210057840 | p03479 | X, Y = list(map(int,input().split()))
ans = 0
tmp = X
while tmp <= Y:
tmp *= 2
ans += 1
print(ans)
| 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 |
s395573706 | p03479 | x, y = map(int,input().split())
a0 = x
k = 0
for i in range(10**7):
if a0 * (2 ** i) <= y:
pass
else:
k = i
break
print(k)
| 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 |
s221897403 | p03479 | x,y = map(int,input().split())
a0 = x
k = 0
for i in range(10**7):
if a0 * (2 ** i) <= y:
pass
else:
k = i
break
print(k)
| 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 |
s366417923 | p03479 | X,Y = map(int,input().split())
ans = 1
a = X
while a<Y:
a = 2*a
if a<=Y:
ans += 1
print(ans) | 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 |
s387348018 | p03479 | x, y = map(int, input().split())
tmp = y//x
cnt = 0
while tmp >= 2:
cnt += 1
tmp = tmp // 2
print(cnt + 1)
| 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 |
s205397672 | p03479 | X , Y = map(int,input().split())
cnt = 0
while True:
if X <= Y:
cnt+=1
X *= 2
else:
break
print(cnt) | 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 |
s471977362 | p03479 | x,y=[int(x) for x in input().split()]
ans=[x]
while ans[-1]*2<=y:
ans.append(ans[-1]*2)
print(len(ans)) | 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 |
s958013708 | p03479 | X,Y=map(int,input().split())
ans=0
while X<=Y:
X*=2
ans+=1
print(ans) | 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 |
s206189400 | p03479 | X,Y= map(int,input().split())
ans = 0
while X <= Y:
X *= 2
ans += 1
print(ans)
| 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 |
s907768835 | p03479 | x, y = map(int, input().split())
ans = 0
while x <= y:
x *= 2
ans += 1
print(ans) | 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 |
s607842716 | p03479 | x, y = map(int, input().split())
ans = 0
while x <= y:
x *= 2
ans += 1
print(ans)
| 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 |
s332695979 | p03479 | def solve(x, y):
count = 0
while x <= y:
x *= 2
count += 1
return count
_x, _y = map(int, input().split())
print(solve(_x, _y))
| 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 |
s140587338 | p03479 | X, Y = list(map(int, input().split()))
t = X
cnt = 0
while t <= Y:
cnt += 1
t *= 2
print(cnt) | 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 |
s167263265 | p03479 | x,y = map(int, input().split())
a = [x]
i = 0
while 1:
if a[i]*2 <= y:
a.append(a[i]*2)
i += 1
else:
break
print(len(a))
| 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 |
s332601034 | p03479 | x,y=map(int,input().split())
ans=0
while x<=y:
ans+=1
x*=2
print(ans) | 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 |
s900118657 | p03479 | x,y=map(int,input().split())
answer = 0
a=x
while True:
answer += 1
a*=2
if a>y:
break
print(answer) | 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 |
s762556635 | p03479 | X, Y = map(int, input().split())
ret = 0
while X <= Y:
ret += 1
X += X
print(ret)
| 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 |
s074658854 | p03479 | x,y=list(map(int,input().split()))
ans=0
while x<=y:
x *= 2
ans +=1
print(ans) | 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 |
s489312571 | p03479 | x,y=map(int,input().split())
cnt=1
a=x
while a<=y:
if 2*a<=y:
cnt+=1
a=a*2
print(cnt) | 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 |
s047583837 | p03479 | x,y=map(int,input().split())
ANS=1
X=x
while True:
if 2 * X <= y:
X = X * 2
ANS += 1
else:
break
print(ANS) | 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 |
s412208102 | p03479 | x,y=map(int,input().split())
a,b=0,x
while True:
if b<=y:
a+=1
b*=2
else:
print(a)
break
| 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 |
s228469044 | p03479 |
x,y = map(int,input().split())
lst1 = []
while True:
lst1.append(x)
if x*2 <= y:
x*=2
else:
break
print(len(lst1)) | 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 |
s252411070 | p03479 |
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
def main():
x, y = MAP()
count = 0
while x <= y:
x = 2 * x
count += 1
print(count)
if __name__ == "__main__":
main()
| 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 |
s735379620 | p03479 | x,y = map(int,input().split())
ans = 0
while x <= y:
ans += 1
x *= 2
print(ans) | 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 |
s674748153 | p03479 | a,b = map(int,input().split())
c = bin(b//a)
print(len(c)-2) | 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 |
s258772329 | p03479 | import sys
input = sys.stdin.readline
def main():
X, Y = [int(x) for x in input().split()]
ans = 0
x = X
while x <= Y:
x = x * 2
ans += 1
print(ans)
if __name__ == '__main__':
main()
| 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 |
s081552399 | p03479 | x, y = map(int, input().split())
count = 0
while x <= y:
count += 1
x = x*2
print(count) | 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 |
s053614673 | p03479 | X,Y = map(int, input().split())
ans = 0
while X<=Y:
ans += 1
X *= 2
print(ans) | 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 |
s916827336 | p03479 | X, Y = map(int, input().split())
a = X
ans = 0
while True:
if a <= Y:
ans += 1
a *= 2
else:
break
print(ans)
| 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 |
s427359105 | p03479 | X, Y = map(int, input().split())
A = []
A.append(X)
for i in range(Y):
if X * 2 <= Y:
X *= 2
A.append(X)
else:
break
print(len(A))
| 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 |
s871080510 | p03479 |
x,y = map(int, input().split())
cnt = 0
b = 1
while x*b<=y:
cnt += 1
b *= 2
print(cnt) | 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 |
s589349488 | p03479 | X, Y = map(int,input().split())
counter = 0
K=X
i = 0
while K <=Y:
counter += 1
K *= 2
print(counter) | 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 |
s550520338 | p03479 | x, y = map(int, input().split())
ans = 0
while x <= y:
x *= 2
ans += 1
print(ans) | 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 |
s502378903 | p03479 | x,y = map(int,input().split())
cnt=0
p=x
while p <= y:
cnt+=1
p=2*p
print(cnt) | 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 |
s350412902 | p03479 | x, y = map(int, input().split())
i = x
ans = [i]
while i <= y:
i = i * 2
if i <= y:
ans.append(i)
print(len(ans)) | 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 |
s010109529 | p03479 | X,Y = map(int, input().split())
ans = 0
while X <= Y:
ans += 1
X <<= 1
print(ans) | 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 |
s798349707 | p03479 | x, y = map(int, input().split())
cnt = 0
while x <= y:
x *= 2
cnt += 1
print(cnt) | 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 |
s059044611 | p03479 | X, Y = map(int, input().split())
b = 0
while True:
Y = Y//2
if Y < X:
b += 1
break
b += 1
print(b)
| 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 |
s168048575 | p03479 | x,y=map(int,input().split())
a=y//x
print(1+len(bin(a))-bin(a).find('1')-1) | 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 |
s300361820 | p03479 | A, Y = map(int, input().split())
ans = 0
while A<=Y:
ans+=1
A*=2
print(ans) | 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 |
s662474794 | p03479 | x, y = map(int, input().split())
ans = 0
while True:
if x > y:
break
ans += 1
x *= 2
print(ans) | 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 |
s736924068 | p03479 |
import sys
input = sys.stdin.readline
"""
H = int(input())
h = [int(ele) for ele in input().split()]
h = [0] + h
"""
def main():
A = []
X, Y = map(int, input().split())
n = X
A.append(n)
while n * 2 <= Y:
n = n*2
A.append(n)
print(len(A))
def bfs(queue):
global yet, graph
if len(queue) == 0:
return
yet.remove(queue[-1])
for i, adjacency in enumerate(graph[queue[-1]]):
if adjacency == 1 and (i in yet) and (i not in queue):
queue.appendleft(i)
else:
queue.pop()
bfs(queue)
def dfs(stack):
global yet, graph
yet.remove(stack[-1])
for i, adjacency in enumerate(graph[stack[-1]]):
if adjacency == 1 and i in yet:
stack.append(i)
dfs(stack)
else:
stack.pop()
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
return divisors
class Node():
def __init__(self):
self.idx = None
self.left = None
self.right = None
self.parent = None
return
def pre_order(self):
global pre_order_str
pre_order_str += str(self.idx) + " "
if self.left:
self.left.pre_order()
if self.right:
self.right.pre_order()
def in_order(self):
global in_order_str
if self.left:
self.left.in_order()
in_order_str += str(self.idx) + " "
if self.right:
self.right.in_order()
def post_order(self):
global post_order_str
if self.left:
self.left.post_order()
if self.right:
self.right.post_order()
post_order_str += str(self.idx) + " "
class HeapHelper():
"""HeapContrler.
完全二分木を二分ヒープで表現した配列 A に対して、
HeapHelper.parent(idx) とするとそのノードの親の添字を返す
存在しない場合は Falseを返す
Returns:
[type] -- [description]
"""
def __init__(self):
return
@staticmethod
def parent(i):
if i == 1:
return False
return int(i/2)
@staticmethod
def left(i):
l_idx = 2*i
if H < l_idx:
return False
return l_idx
@staticmethod
def right(i):
r_idx = 2*i + 1
if H < r_idx:
return False
return r_idx
if __name__ == "__main__":
main()
| 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 |
s964284976 | p03479 | X,Y = (int(_) for _ in input().split())
cnt = 1
tmp = X
while tmp*2 <= Y:
cnt += 1
tmp = tmp*2
print(cnt) | 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 |
s295017435 | p03479 | x,y=map(int,input().split())
ans=0
while x<=y:
ans+=1
x*=2
print(ans)
| 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 |
s631515615 | p03479 | X, Y = map(int, input().split())
ans = 0
while X <= Y:
X *= 2
ans += 1
print(ans) | 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 |
s438916790 | p03479 | x,y=map(int,input().split())
n=y//x
print(len(bin(n))-2) | 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 |
s922343427 | p03479 | X, Y = map(int, input().split(' '))
cnt = 0
while X <= Y:
X *= 2
cnt += 1
print(cnt) | 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 |
s189468251 | p03479 | x,y=map(int,input().split())
cnt=1
while True:
x*=2
if x>y:
break
else:
cnt+=1
print(cnt)
| 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 |
s424286439 | p03479 | X, Y = map(int, input().split())
d = Y // X
p = 0
while d != 0:
p += 1
d //= 2
print(p) | 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 |
s410037484 | p03479 | import sys
input = sys.stdin.readline
x,y=map(int,input().split())
ans=1
for i in range(y-x):
x*=2
if x>y:
break
ans+=1
print(ans)
| 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 |
s080169728 | p03479 |
X, Y = map(int, input().split())
count = 0
while X <= Y:
count += 1
X *= 2
print(count) | 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 |
s617245955 | p03479 | import sys
import os
if sys.platform=="darwin":
base = os.path.dirname(os.path.abspath(__file__))
name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
sys.stdin = open(name)
x,y = map(int,input().split())
a = x
ans = 0
while a <= y:
ans = ans + 1
a = a*2
print(ans)
| 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 |
s199149680 | p03479 | X, Y = map(int, input().split())
ans = 0
while X <= Y:
ans += 1
X *= 2
print(ans) | 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 |
s977197508 | p03479 | temp=list(map(int, input().split()))
X=temp[0]
Y=temp[1]
ans=0
while True:
ans+=1
X*=2
if X>Y:
break
print(ans) | 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 |
s582744077 | p03479 | x,y = map(int, input().split())
ans=0
i=x
while i<=y:
ans+=1
i*=2
print(ans)
| 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 |
s886504693 | p03479 | x, y = map(int, input().split())
ans = 0
for i in range(10000):
ans+=1
x*=2
if x>y:
break
print(ans) | 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 |
s152600408 | p03479 | x,y=map(int,input().split())
i=0
a=x*pow(2,i)
while a <= y:
i+=1
a=x*pow(2,i)
print(i) | 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 |
s594857184 | p03479 | X, Y = list(map(int, input().split()))
ans = 0
while X <= Y:
ans += 1
X = X * 2
print(ans) | 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 |
s876760447 | p03479 | x,y = map(int,(input().split()))
ans = 0
for i in range(10**18):
x *= 2
if x > y:
ans = i+1
break
print(ans) | 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 |
s574065563 | p03479 | x,y = map(int,input().split())
ans = 0
while x < y:
ans += 1
x *= 2
else:
if x == y:
ans += 1
print(ans) | 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 |
s710201307 | p03479 | x, y = map(int, input().split())
for i in range(100):
if x * (2 ** i) > y:
print(i)
break | 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 |
s289998202 | p03479 | x,y = map(int,input().split())
ans = 0
while x <= y:
x *= 2
ans += 1
print(ans) | 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 |
s942661814 | p03479 |
X, Y = map(int, input().split())
Z = Y // X
num = 0
while True:
if Z < (1 << num):
break
num += 1
print(num) | 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 |
s922007833 | p03479 | x, y = map(int, input().split())
n = 1
while x * 2 ** n <= y:
n += 1
print(n) | 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 |
s252505280 | p03479 | a,b = map(int, input().split())
cnt = 1
while 2*a<=b:
a *= 2
cnt += 1
print(cnt)
| 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 |
s187332159 | p03479 | def main():
x,y=map(int,input().split())
m=x
ans=1
while m*2<=y:
m *= 2
ans += 1
print(ans)
main() | 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 |
s910067620 | p03479 | a = input().split()
b=0
c=[int(a[0])]
while(0==0):
if c[b]*2<=int(a[1]):
c.append(c[b]*2)
b+=1
else:
print(len(c))
break | 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 |
s043392287 | p03479 | x, y = map(int, input().split())
count=0
while x <= y:
x *= 2
count+=1
print(count)
| 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 |
s348612544 | p03479 |
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
def show(*inp, end='\n'):
if show_flg:
print(*inp, end=end)
YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
show_flg = True
def main():
X, Y = MI()
tmp = math.log2(Y) - math.log2(X)
if X * 2 ** (int(tmp) + 1) <= Y:
print(int(tmp) + 2)
return
elif X * 2 ** int(tmp) <= Y:
print(int(tmp) + 1)
return
elif X * 2 ** (int(tmp)-1) <= Y:
print(int(tmp))
return
print(-1)
return
ans = 0
c = X
while c <= Y:
c = c * 2
ans += 1
print(ans)
if __name__ == '__main__':
main()
| 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 |
s544577103 | p03479 |
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
def show(*inp, end='\n'):
if show_flg:
print(*inp, end=end)
YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
show_flg = True
def main():
X, Y = MI()
ans = 0
c = X
while c <= Y:
c = c * 2
ans += 1
print(ans)
if __name__ == '__main__':
main()
| 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 |
s034707749 | p03479 | x,y=map(int, input().split())
for i in range(1,1000):
if (x*2**i > y):
print(i)
exit()
| 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 |
s333687341 | p03479 | X,Y = (int(_) for _ in input().split())
def cal_num(x,y,cnt):
if x*2 <= y:
cnt += 1
return(cal_num(x*2,y,cnt))
else:
return(cnt)
print(cal_num(X,Y,1)) | 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 |
s665433162 | p03479 | X, Y=map(int, input().split())
counter=1
X*=2
while X<=Y:
counter+=1
X*=2
print(counter) | 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 |