题解 CF791A 【Bear and Big Brother】

QWQ,萌新的写法

超暴力

首先输入a,b,开始循环

个人喜欢一边更改a,b的值一边循环

循环的时候,累加t++

代码如下(曾经我也是P党……但我违心地写了C++……):

#include<bits/stdc++.h> 
using namespace std;
int main()
{
	int n,m;
	int t=0;
	cin>>n>>m;
	while(n<=m)
	{
		n*=3;
		m*=2;
		t++;
	}
	cout<<t;
	return 0;
}
posted @ 2020-03-21 21:17  Laser_Crystal  阅读(120)  评论(0编辑  收藏  举报