Source Code
#include <iostream>
 using namespace std;
int main() {
	int h,t, count =0;
	cin>>h>>t;
	int flag = 0;
	if((h >=1 && h <= 100) && (t >= 1 && t <= 100)) flag = 1;
	while(t<=h && flag == 1)	{
		t = t+t;
		count+=1;
	}
	cout<<count<<endl;
	return 0;
}
Copy
The Tortoise and the Hare 5hafiq
GNU G++14
3 ms
692 KB
Wrong Answer