sol_id
stringlengths
10
10
problem_id
stringlengths
6
6
solution_text
stringlengths
3
618k
problem_text
stringlengths
0
18.4k
s906188925
p03479
X, Y = map(int, input().split()) ans = 0 ai = X while ai <= Y: ai = 2 * ai 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
s530782340
p03479
import math x, y = map(int, input().split()) tmp = x cnt = 0 while y>=tmp: tmp = tmp * 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
s061102991
p03479
import math x,y = map(int,input().split()) """ 倀をどんどん2ε€γ—γ¦γ„γ£γ¦γ€γγ‚ŒγŒyγ‚’θΆ…γˆγͺγ„γ‹γ‚’ζ€œθ¨Όγ—γ€θΆŠγˆγͺγ‘γ‚Œγ°γ‚«γ‚¦γƒ³γƒˆγ‚’ε’—γ‚„γ™ """ count = 0 origin = x while True: if origin <= y: count+=1 origin = origin * 2 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
s078131925
p03479
def solve(): X, Y = map(int,input().split()) cnt = 0 while X <= Y: cnt += 1 X *= 2 print(cnt) if __name__ == '__main__': solve()
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
s291358124
p03479
x,y=map(int,input().split()) iimax=int(18/3*10+1) m=y//x i2=1 for i in range(iimax): if m<2*i2: print(i+1) break else : i2=i2*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
s407511876
p03479
x,y=map(int,input().split());a=0 while x<=y:x*=2;a+=1 print(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
s535974137
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
s224106218
p03479
x, y = map(int, input().split()) ans = 0 while y >= x: y //= 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
s458733090
p03479
x,y = map(int,input().split()) count = 0 ans = x while ans <= y: ans = ans * 2 count = 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
s025491377
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
s256369219
p03479
X,Y = map(int,input().split()) ans = [X] while 1: X *= 2 if X <= Y: ans.append(X) else: break 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
s396785278
p03479
x,y=map(int,input().split()) print(len(bin(y//x))-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
s133832711
p03479
x,y = map(int,input().split()) count = 1 while True: if x * 2 <= y: count+=1 x*=2 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
s957986033
p03479
x,y = map(int,input().split()) cnt = 0 while True: if x > y: break else: cnt+=1 x *= 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
s785241472
p03479
X,Y = map(int,input().split()) ans = 0 while Y>=X: 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
s615746058
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
s175841273
p03479
x,y=map(int,input().split()) i=0 while x*2**i<=y: 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
s972174404
p03479
x, y = [int(i) for i in input().split()] n = x cnt = 0 while n <= y: cnt += 1 n *= 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
s223806477
p03479
X,Y = map(int,input().split()) ans = 0 while Y>=X: 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
s946912549
p03479
import sys DEBUG = False def read(t): return t(sys.stdin.readline().rstrip()) def read_list(t, sep = " "): return [t(s) for s in sys.stdin.readline().rstrip().split(sep)] def dprint(*args, **kwargs): if DEBUG: print(*args, **kwargs) return def main(): x, y = read_list(int) length = 0 while x <= y: x *= 2 length += 1 print(length) 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
s793913970
p03479
x,y = map(int,input().split()) ans = 0 sy = x while sy <= y: sy *= 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
s026852506
p03479
x,y=map(int,input().split());print(len(bin(y//x))-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
s884728061
p03479
x,y=map(int,input().split()) print(len(bin(y//x))-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
s350460507
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
s533595653
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
s342559184
p03479
X, Y = [int(i) for i in input().split()] output = 0 while Y >= X: X = 2 * X output += 1 print(output)
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
s987912051
p03479
x,y = map(int,input().split()) ans = 0 while(y>=x): y//=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
s414699448
p03479
def resolve(): X,Y=map(int,input().split()) count =0 while X<=Y: count +=1 X*=2 print(count) if __name__ == "__main__": resolve()
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
s673701924
p03479
x,y=input().split(); k,w=int(y)//int(x),0 while 2**w<=k:w=w+1 print(w)
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
s125268194
p03479
X, Y = map(int,input().split()) ans = 0 while Y >= X: X = 2 * X 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
s044972646
p03479
X, Y = map(int,input().split()) ans = 1 while Y >= X: X = 2 * X ans += 1 print(ans - 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
s957319211
p03479
x,y = [int(i) for i in input().split()] ans = 1 for i in range(1,61): if y//x < 2**i: break else: 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
s408547115
p03479
x, y = map(int, input().split()) z = y // x for i in range(10**18): if x * pow(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
s770517640
p03479
x,y = map(int, input().split()) z=0 while x <= y: z+=1 x=x*2 print(z)
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
s463788723
p03479
X,Y=map(int,input().split()) number=1 while X*2<=Y: X*=2 number+=1 print(number)
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
s726469552
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
s643662365
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
s595043302
p03479
def main(): x, y = map(int, input().split()) last_num = x ans = 1 while 1: if last_num * 2 <= y: last_num *= 2 ans += 1 else: break 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
s642878222
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
s659212504
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
s001610216
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
s536861675
p03479
x,y = [int(x) for x in 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
s918913050
p03479
X, Y = map(int, input().split()) box = [X] while True: if box[-1]*2 <= Y: box.append(box[-1]*2) continue else: break print(len(box))
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
s725146578
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
s439079460
p03479
a,b = [int(x) for x in input().split()] ans = 0 while a<=b: a *= 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
s216107688
p03479
def main(): X,Y = map(int,input().split(" ")) A = int(X) ans = 1 while A <= Y: A *= 2 if A <= Y: 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
s435319725
p03479
ans = 0 x, y = map(int, input().split()) while x <= y: x, ans = 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
s274048403
p03479
X, Y = map(int, input().split()) A = [X] i = 0 while A[i] <= Y: A.append(A[i] * 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
s780996505
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
s916101655
p03479
def main(): x, y = map(int, input().split()) cnt = 0 while True: cnt += 1 x *= 2 if x > y: break print(cnt) 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
s786747406
p03479
X, Y = map(int, input().split()) ans = 1 n = 1 a = X while a <= Y: a = X * (2 ** n) if a <= Y: ans += 1 n += 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
s200302252
p03479
X,Y=map(int,input().split()) atmp=X ans=1 for _ in range(65): if atmp*2<=Y: ans+=1 atmp*=2 else: print(ans) 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
s870033872
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
s985903657
p03479
x, y = map(int, input().split()) c = 1 while x*2 <= y: x *= 2 c += 1 print(c)
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
s241611257
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
s420811428
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
s636371183
p03479
X,Y = map(int,input().split()) i = 1 while Y >= X*(2**(i-1)): 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
s015085702
p03479
X,Y = map(int,input().split()) cnt=0 while X<=Y: cnt+=1 X = X*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
s767767210
p03479
def Multiple_Gift(x , y): ans = 1 while x < y: if x * 2 <= y: ans += 1 x = x * 2 return ans def main(): x , y = map(int , input().split()) print(Multiple_Gift(x , y)) 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
s339910533
p03479
import numpy as np x,y=list(map(int,input().split())) print(np.floor(np.log2(y//x,dtype=np.longdouble)).astype(np.int)+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
s719675492
p03479
def solve(*args: str) -> str: x, y = map(int, args[0].split()) count = 0 while x <= y: count += 1 x *= 2 return str(count) if __name__ == "__main__": print(solve(*(open(0).read().splitlines())))
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
s673597903
p03479
x,y=input().split(); k,w=int(y)//int(x),1 while 2**(w-1)<=k:w=w+1 print(w-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
s274863580
p03479
x, y = map(int, input().split()) r = 1 while x*(2**r) <= y: r += 1 print(r)
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
s109297404
p03479
X, Y = map(int, input().split()) count = 0 while X <= Y: Y = Y >> 1 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
s206990893
p03479
import math x,y=map(int,input().split()) for p in range(61): if 2**p>y//x: print(p) exit(0)
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
s666814332
p03479
def solve(): min_number, max_number = list(map(int, input().split())) current_number = min_number answer = 0 while current_number <= max_number: answer += 1 current_number = current_number * 2 print(answer) solve()
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
s658320621
p03479
def solve(): min_number, max_number = list(map(int, input().split())) current_number = min_number answer = 1 while True: next_number = current_number * 2 if next_number <= max_number: current_number = next_number answer += 1 else: break print(answer) solve()
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
s195010091
p03479
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines def main(): x,y = map(int, readline().split()) i = 1 while x * 2**i <= y: i += 1 ans = i 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
s583869298
p03479
x, y = map(int, input().split()) num = x 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
s520380179
p03479
X,Y=map(int,list(input().split(" "))) sum=0 while X<=Y: sum+=1 X=2*X print(sum)
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
s823982779
p03479
X,Y=map(int,input().split()) count=0 while True: if X*2<=Y: count=count+1 X=X*2 else: break print(count+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
s664283153
p03479
import sys from itertools import permutations import math from operator import itemgetter 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
s187953291
p03479
import math import heapq import bisect import numpy as np from collections import Counter X,Y = map(int, input().split()) ans = 1 while X*2 <= 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
s258037389
p03479
X_low, Y_up = map(int, input().split()) value = X_low cnt = 0 while (value <= Y_up): cnt += 1 value *= 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
s171407727
p03479
x, y = map(int, input().split()) ans = 1 while x < y: if x*2 <= y: ans += 1 x *= 2 else: 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
s226629812
p03479
X,Y = map(int,input().split()) count = 1 for i in range(10000): if X*2 <= Y: count += 1 X = X*2 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
s779329539
p03479
x,y=map(int,input().split()) c=0 while x<=y: x=x*2 c+=1 print(c)
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
s913572814
p03479
X, Y=map(int, input().split()) A=X count=0 while A<=Y: count+=1 A*=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
s605465340
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
s155926625
p03479
def lcm(x, y): return (x * y) // math.gcd(x, y) x, y = map(int, input().split()) i = 0 while True: if x * 2 ** i > y: break 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
s401349092
p03479
def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) mod=10**9+7 x,y=MI() ans=1 a=x for i in range(1000): a=a*2 if a>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
s281534434
p03479
x,y = map(int, input().split()) now=x ans=0 while now <=y: now*=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
s113494222
p03479
x,y=map(int,input().split()) i = 0 while True: tmp = 2**i * x if tmp > y: break 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
s851408973
p03479
x, y = map(int, input().split()) ans = 0 w = x while w <= y: ans += 1 w *= 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
s127577874
p03479
x,y = map(int,input().split()) count = 1 while 1: 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
s130144124
p03479
x, y = list(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
s390005842
p03479
import fractions x,y=map(int,input().split()) cnt=1 a,b=x,x*2 while True: if b<=y: g=a*b//fractions.gcd(a,b) a,b=b,2*g cnt+=1 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
s463130885
p03479
x, y = map(int, input().split()) res = [] while x <= y: res.append(x) x = x * 2 print(len(res))
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
s485229762
p03479
x, y = map(int, input().split()) c = 0 while x <= y: c += 1 x *= 2 print(c)
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
s239173235
p03479
from decimal import Decimal X,Y = list(map(int,input().split())) print(int((Decimal(Y)/Decimal(X)).ln()/Decimal(2).ln())+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
s171646783
p03479
import math 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
s075259961
p03479
import itertools import math import sys from collections import Counter from fractions import gcd from functools import reduce x, y = map(int, input().split()) a = x ans = 1 while a * 2 <= y: a *= 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
s441349031
p03479
A, B = map(int, input().split()) a = [] a.append(A) while max(a)<B: a.append(max(a)*2) if max(a)>B: a.remove(max(a)) 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
s093733889
p03479
a,b=map(int,input().split()) for i in range(1000000): if a*2**i>b: 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
s082456104
p03479
x,y = map(int,input().split()) a = x 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
s041586872
p03479
X, Y = map(int, input().split()) a = X+0 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
s804950058
p03479
def main(): x,y=map(int,input().split()) ans=1 while(True): if x*2<=y: ans+=1 x=2*x else: break 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
s139518854
p03479
x,y = map(int,input().split()) l = [] while x<=y: l.append(x) x*=2 print(len(l))
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
s790375317
p03479
def main(): lower_limit, upper_limit = map(int, input().split()) answer = 0 while lower_limit <= upper_limit: lower_limit *= 2 answer += 1 print(answer) 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
s351006265
p03479
import math from decimal import * X, Y = [int(x) for x in input().split()] X = Decimal(str(X)) Y = Decimal(str(Y)) i = 1 cnt = 0 while True: if i > Decimal(Y/X): break i *= 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