。。。不行。这题之后、不做1000分以下的了。很耻辱
 
A. Bear and Big Brother
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Bear Limak wants to become the largest of bears, or at least to become larger than his brother Bob.

Right now, Limak and Bob weigh a and b respectively. It's guaranteed that Limak's weight is smaller than or equal to his brother's weight.

Limak eats a lot and his weight is tripled after every year, while Bob's weight is doubled after every year.

After how many full years will Limak become strictly larger (strictly heavier) than Bob?

Input

The only line of the input contains two integers a and b (1 ≤ a ≤ b ≤ 10) — the weight of Limak and the weight of Bob respectively.

Output

Print one integer, denoting the integer number of years after which Limak will become strictly larger than Bob.

Examples
input

Copy
4 7
output

Copy
2
input

Copy
4 9
output

Copy
3
input

Copy
1 1
output

Copy
1
Note

In the first sample, Limak weighs 4 and Bob weighs 7 initially. After one year their weights are 4·3 = 12 and 7·2 = 14 respectively (one weight is tripled while the other one is doubled). Limak isn't larger than Bob yet. After the second year weights are 36 and 28, so the first weight is greater than the second one. Limak became larger than Bob after two years so you should print 2.

In the second sample, Limak's and Bob's weights in next years are: 12 and 18, then 36 and 36, and finally 108 and 72 (after three years). The answer is 3. Remember that Limak wants to be larger than Bob and he won't be satisfied with equal weights.

In the third sample, Limak becomes larger than Bob after the first year. Their weights will be 3 and 2 then.

#include<iostream>
using namespace std;
int main(){
int a;
int b;
cin>>a;
cin>>b;
int res = ;
do{
res++;
a*=;
b*=;
}while(a<=b);
cout<<res;
return ;
}

最新文章

  1. css3 text-overflow和white-space,word-wrap,word-break进阶
  2. Django admin coercing to Unicode: need string or buffer, tuple found
  3. POJ 1741 Tree 树分治
  4. 像jQuery那样,采用链式方法,封装一个方法:CSS()
  5. CentOS 7 网络配置方法
  6. 数值的整数次方(剑指offer面试题11)
  7. java学习之创建线程方法二
  8. Python之路【第五篇】:面向对象和相关
  9. 文本溢出、垂直外边距合并、BFC、hasLayout
  10. 概率图模型(PGM)学习笔记(四)-贝叶斯网络-伯努利贝叶斯-多项式贝叶斯
  11. 微软MVP社区夏日巡讲诚邀您的参与: 北京,上海,西宁,成都,西安
  12. 使用Visual Studio 2010写Data Url生成工具C#版本
  13. ASP.NET中ListBox控件的使用
  14. css grid布局的首次使用
  15. ASP.NET Core WebApi 返回统一格式参数(Json 中 Null 替换为空字符串)
  16. IOC 的理解与解释
  17. (四)五种IO模型
  18. UITableView(自定义cell)试水心得
  19. nullpointerxception——处理思路
  20. Debian 8 安装录屏软件kazam

热门文章

  1. 如何封装RESTful Web Service
  2. Applied Nonparametric Statistics-lec1
  3. Linux下的硬件驱动——USB设备(转载)
  4. 二叉排序树:HUD3999-The order of a Tree(二叉排序树字典序输出)
  5. hdu 5533
  6. vagrant中的precise64使用静态的能和host所在局域网的其他机器互相通信
  7. poj1523赤裸裸的割点
  8. JS实现——Base64编码解码,带16进制显示
  9. apache php 多站点配置 重新整理
  10. apple苹果产品国行和港行的区别