YouTube video link : click here Question link : click here
Solution : in Java
import java.util.Scanner;
public class BearandBigBrother {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int l = sc.nextInt();
int b = sc.nextInt();
int count = 0;
while(l<=b){
l *=3;
b *=2;
count++;
}
System.out.println(count);
}
}
______________________________________________
Thanks for visiting
0 Comments