Source Code
#include <iostream>
using namespace std;

int main() {
	int h,t;
	cin>>h>>t;
	if(h<t) {
		cout<<0<<endl;
		return 0;
	}
	
	int ans=0;
	while(t<h+1){
		t+=t;
		ans++;
	}
	cout<<ans<<endl;
	return 0;
}
Copy
The Tortoise and the Hare Razanaws
GNU G++17
3 ms
596 KB
Wrong Answer