Given two bears with different weights, determine how many years it takes for the first bear to become strictly heavier than the second if both grow at fixed annual rates.
Limak and Bob are bears with initial weights and kilograms, respectively, where .
Every year:
Your task is to determine the smallest number of years after which Limak's weight becomes strictly greater than Bob's weight.
Return that minimum number of years.
Example 1
Input
4 7
Output
2
Explanation
After 1 year: Limak = 12, Bob = 14. After 2 years: Limak = 36, Bob = 28. Limak becomes strictly heavier in 2 years.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.