Bedao Regular Contest 17 - Dãy bội

View as PDF

Submit solution


Points: 0.10 (partial)
Time limit: 1.0s
Memory limit: 256M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

Dế Mèn có 2 số ~L~ và ~R~. Tìm dãy ~a~ độ dài ~k~ bất kỳ thỏa:

  • ~a_i~ chia hết cho ~a_{i-1}~.

  • các số trong dãy ~a~ phân biệt đôi một.

  • ~a_1 = L, a_k = R~.

  • ~k~ lớn nhất có thể.

In ra độ dài ~k~ lớn nhất có thể có.

Input

  • Dòng duy nhất nhập vào hai số nguyên dương ~L~ và ~R~ (~1 \le L < R \le 10^{15}~).

  • Dữ liệu đảm bảo ~R~ chia hết cho ~L~.

Output

In ra một số nguyên ~k~ là độ dài lớn nhất của dãy ~a~ tìm được.

Scoring

Subtask Điểm Giới hạn
1 ~30~ ~R = 2^i, 1 \le i \le 29~.
2 ~70~ Không có điều kiện gì thêm.

Sample Input 1

3 18

Sample Output 1

3

Notes

Dãy ~a~ có thể là ~[3, 9, 18]~.


Comments

Please read the guidelines before commenting.



  • -9
    chunguyen2k8  commented on July 2, 2024, 12:26 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -5
    Sang522008  commented on Dec. 21, 2023, 12:58 p.m. edited

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -16
    trunn  commented on Oct. 16, 2023, 2:22 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -48
    SimpNL  commented on Oct. 4, 2023, 5:23 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -58
    mo_co_giai_VOI  commented on Oct. 3, 2023, 10:29 a.m. edited

    This comment is hidden due to too much negative feedback. Show it anyway.