sol_id
stringlengths
10
10
problem_id
stringlengths
6
6
solution_text
stringlengths
3
618k
problem_text
stringlengths
0
18.4k
s914972032
p03479
x,y = map(int, input().split()) a = x ans = 0 while a <= y: a = 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
s396160831
p03479
import sys x, y = map(int, sys.stdin.readline().split()) def main(): a = x cnt = 0 while a <= y: cnt += 1 a *= 2 return cnt if __name__ == '__main__': ans = main() 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
s279164940
p03479
def solve(X, Y): tmp = X ans = 0 while tmp <= Y: ans += 1 tmp *= 2 return ans def main(): X, Y = map(int, input().split()) ans = solve(X, Y) 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
s610746904
p03479
x, y = map(int, input().split()) def solve(): num = x ans = 0 while num <= y: ans += 1 num *= 2 print(ans) def main(): solve() 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
s000592107
p03479
x, y = map(int, input().split()) cnt = 0 while x <= y: 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
s582052679
p03479
X,Y=map(int,input().split()) x=X ans=0 while True: if x>Y: break else: 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
s850975975
p03479
x,y=map(int,input().split()) for i in range(1,1000): x*=2 if x>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
s272145808
p03479
X, Y = map(int, input().split()) cnt = 0 while True: if X < Y: cnt += 1 X *= 2 else: if X == Y: cnt += 1 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
s391956743
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
s338725489
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
s198934217
p03479
x, y = map(int, input().split()) cnt = 0 while x <= y: 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
s807871393
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
s232571754
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
s677158740
p03479
import sys x, y = map(int, sys.stdin.readline().split()) cnt =0 while True: if x <=y: cnt +=1 x = 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
s063087166
p03479
x, y = map(int, input().split()) ans = 1 for i in range(80): x *= 2 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
s561256920
p03479
X, Y = map(int, input().split()) A = [X] for i in range(0,10**8): Z = 2*A[i] if Z <= Y: A.append(Z) 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
s930390053
p03479
x, y = map(int, input().split()) ans = 0 while x <= y: x <<= 1 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
s990334717
p03479
x, y = map(int, input().split()) check = 0 count = 0 while check == 0: count += 1 x = x * 2 if x > y: check = 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
s002557277
p03479
X, Y = map(int, input().split()) ans = 0 x = X 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
s004921440
p03479
def solve(): X, Y = map(int, input().split()) ans = 0 a = X while a <= Y: ans += 1 a *= 2 print(ans) 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
s066233841
p03479
[X, Y] = [int(i) for i in input().split()] gift = [X] now = X while (True): new = 2 * now if new <= Y: gift.append(new) now = new else: break print(len(gift))
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
s970952362
p03479
X , Y = map(int,input().split()) now = X ans = 0 while now <= Y: ans += 1 now *= 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
s114168130
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
s435991461
p03479
X,Y=map(int,input().split()) answer=len(str(bin(Y//X)))-2 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
s637237398
p03479
def main(): x,y=map(int,input().split()) y //= x res = 1 while y >= 2 : y //= 2 res += 1 return res print(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
s553127527
p03479
def main(): x,y=map(int,input().split()) if y // x < 2: return 1 y //= x res = 2 while y >= 4 : y //= 2 res += 1 return res print(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
s395483216
p03479
import sys input = sys.stdin.readline sys.setrecursionlimit(1000000) from collections import deque def getN(): return int(input()) def getList(): return list(map(int, input().split())) import math import bisect from logging import getLogger, StreamHandler, DEBUG, WARNING logger = getLogger(__name__) handler = StreamHandler() handler.setLevel(DEBUG) logger.setLevel(DEBUG) logger.addHandler(handler) def main(): x, y = getList() ans = 0 while(True): if x <= y: ans += 1 x *= 2 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
s666264515
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
s967843184
p03479
x,y = map(int,input().split()) ans = 1 while True: 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
s039715702
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
s300395771
p03479
x,y=map(int,input().split()) ans_li=[] for i in range(1000): if x*(2**i)<=y: ans_li.append(i+1) print(max(ans_li))
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
s599548772
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
s413508043
p03479
X, Y = map(int, input().split()) k = Y // X ans = 1 while 2 ** ans <= k: 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
s560628472
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
s735255979
p03479
X, Y = map(int, input().split()) cnt = 0 while X <= Y: 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
s810282697
p03479
x, y = map(int, input().split()) tmp = x cnt = 1 while True: tmp*=2 if tmp > y: break 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
s759490379
p03479
x,y = map(int,input().split()) ans = 0 while True: if x <= y: ans += 1 else: print(ans) import sys sys.exit() x = 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
s527580930
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
s268492275
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
s103337713
p03479
import sys if sys.platform =='ios': sys.stdin=open('Untitled.txt') input = sys.stdin.readline def MAP(): return [int(s) for s in input().split()] X,Y= MAP() n=X cnt=1 while True: if n*2 <= Y: n *= 2 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
s796291868
p03479
X,Y=map(int, input().split()) Ans=0 a=X 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
s634120225
p03479
a,b=map(int,input().split()) ans=0 while b >= a: 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
s032175363
p03479
def main(): X, Y = map(int, input().split()) p = X ans = 1 while 2*p <= Y: p *= 2 ans += 1 return ans if __name__ == '__main__': print(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
s642216516
p03479
x,y=map(int,input().split()) cnt=1 while x*2<=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
s196365655
p03479
X,Y=map(int,input().split()) i=X m=1 while 2*i<=Y: i=2*i m+=1 print(m)
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
s350544395
p03479
X, Y = map(int,input().split()) n = X cnt = 1 while True: n *= 2 if n>Y: print(cnt) exit() else: 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
s266066943
p03479
x, y = map(int, input().split()) for i in range(1, 65): 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
s794418221
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
s423442205
p03479
X, Y = map(int, input().split()) ans = 0 a = X 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
s943673282
p03479
a,b=map(int,input().split()) ans=0 while b>=a: 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
s312630628
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
s894295965
p03479
import sys sys.setrecursionlimit(2147483647) INF=float("inf") MOD=10**9+7 input=lambda :sys.stdin.readline().rstrip() def resolve(): x,y=map(int,input().split()) ans=0 while(y>=x): ans+=1 x*=2 print(ans) 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
s345745987
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
s955535340
p03479
from sys import stdin a,b = [int(x) for x in stdin.readline().rstrip().split()] num = a point = 0 while num <= b: num *= 2 point += 1 print(point)
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
s900505618
p03479
X,Y = map(int, input().split()) ans = 1 for i in range(1,1000000000): if X*(2**i)<=Y: 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
s076224477
p03479
a,b=map(int,input().split()) cnt=0 while 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
s185192026
p03479
X, Y = list(map(int, input().split())) ans = 1 n = 1 while X * (2 ** n) <= Y: ans += 1 n += 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
s749022247
p03479
import heapq as h import math import numpy as np import copy import itertools x,y = map(int,input().split()) val = x count = 0 while val <= y: count += 1 val = val*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
s163944046
p03479
def examC(): X, Y = LI() ans = (Y//X).bit_length() print(ans) import sys,copy,bisect,itertools,heapq,math from heapq import heappop,heappush,heapify from collections import Counter,defaultdict,deque def I(): return int(sys.stdin.readline()) def LI(): return list(map(int,sys.stdin.readline().split())) def LS(): return sys.stdin.readline().split() def S(): return sys.stdin.readline().strip() mod = 10**9 + 7 inf = float('inf') examC()
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
s364913806
p03479
x, y = map(int, input().split()) c = 1 while y >= x*2: 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
s969720192
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
s530986236
p03479
x,y=map(int,input().split()) c=0 while x<=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
s954787924
p03479
from collections import Counter,defaultdict,deque from heapq import heappop,heappush,heapify import sys,bisect,math,itertools sys.setrecursionlimit(10**8) mod = 10**9+7 mod2 = 998244353 INF = float('inf') def inp(): return int(sys.stdin.readline()) def inpl(): return list(map(int, sys.stdin.readline().split())) def inpln(n): return list(int(sys.stdin.readline()) for i in range(n)) x,y = inpl() res = 0 while x*2**res <= y: res += 1 print(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
s945295475
p03479
import sys, math input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') sys.setrecursionlimit(10**8) inf = float('inf') ans=count=0 x,y=map(int,input().split()) 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
s225088536
p03479
import sys, math input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') sys.setrecursionlimit(10**8) inf = float('inf') ans=count=0 x,y=map(int,input().split()) 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
s322355528
p03479
import sys import math x, y = [int(x) for x in sys.stdin.readline().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
s990442069
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
s739146562
p03479
x, y = map(int, input().split()) for i in range(1, 10**10): 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
s644200569
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
s175305784
p03479
X, Y = list(map(int,input().split())) p = X count = 0 while p <= Y: p *= 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
s101931978
p03479
X, Y = map(int, input().split()) p = X cnt = 0 while p <= Y: p *= 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
s895090799
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
s688275486
p03479
x,y=map(int,input().split()) cnt=1 current=x while 1: current*=2 if current<=y: 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
s229872288
p03479
X, Y = map(int, input().split()) counter = 1 while True: X *= 2 if X <= Y: counter += 1 else: break 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
s253942729
p03479
from collections import deque X, Y = [int(x) for x in input().split()] ai = X i = 0 while ai <= Y: ai *= 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
s989745425
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
s671069300
p03479
X,Y = map(int,input().split(' ')) output_list = [] while X <= Y: output_list.append(X) X = X*2 print(len(output_list))
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
s331474207
p03479
x,y=map(int,input().split()) n=0 while x<=y: x*=2 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
s433473787
p03479
a, b = map(int, input().split()) count=0 while a<=b: a=a*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
s239111615
p03479
x,y = map(int,input().split()) cur,count = x,1 while cur <= y: if cur * 2 <= y: cur *= 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
s453129876
p03479
num_min, num_max = map(int, input().split()) def search(mult, ans): if mult*2 <= num_max: ans += 1 search(mult*2, ans) else: print(ans) search(num_min, 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
s565899295
p03479
X,Y = map(int,input().split()) ans = 1 val = X while 1: val *= 2 if val <= Y: 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
s450491507
p03479
x, y = map(int, input().split()) count = 1 last = x while True: last *= 2 if last <= y: count += 1 else: print(count) 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
s560175257
p03479
X , Y = map(int,input().split()) cnt = 0 x = X while x <= Y: 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
s492738047
p03479
x,y = map(int, input().split()) a = [] i = 0 while True: b = 2**i if b*x <=y: 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
s720431879
p03479
x, y = map(int, input().split()) length = 0 number = x while number <= y: length += 1 number *= 2 print(length)
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
s452330000
p03479
x,y=map(int,input().split()) cnt=0 while x<=y: 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
s018310577
p03479
x, y = map(int, input().split()) line = [] line.append(x) tmp = x while(tmp * 2 <= y): line.append(tmp * 2) tmp *= 2 print(len(line))
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
s080124411
p03479
def main(): X, Y = map(int, input().split()) tmp = X cnt = 1 while tmp * 2 <= Y: cnt += 1 tmp = 2 * tmp print(cnt) 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
s343017341
p03479
x,y=map(int,input().split()) ans=[x] while x*2<=y: ans.append(x*2) x*=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
s579124420
p03479
x,y=map(int, input().split()) z=x ans=0 while z<=y: z=z*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
s363062899
p03479
x,y=map(int,input().split()) res=0 while x<=y: res+=1 x=x*2 print(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
s427178739
p03479
k,s=map(int,input().split()) count=1 for i in range(s): if k*2<=s: k*=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
s426374201
p03479
x,y=map(int,input().split()) ans=0 a=x 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
s659254191
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
s334281858
p03479
x,y=map(int,input().split()) ans=1 while x<=y: x*=2 if x>y: print(ans) 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
s589938392
p03479
A,B=map(int,input().split()) ans=0 tmp=A while tmp<=B: 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
s993109537
p03479
x,y=map(int,input().split()) cnt=0 while x<=y: 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
s520153622
p03479
x, y = map(int, input().split()) cnt = 0 while True: if x > y: break 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
s946158412
p03479
X,Y=map(int,input().split()) ans=1 while True: 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