fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int a, b;
  7. cin >> a >> b;
  8. int k = 0;
  9. while (a <= b){
  10. a*=3;
  11. b*=2;
  12. k++;
  13. }
  14. cout << k;
  15. return 0;
  16. }
Success #stdin #stdout 0s 16064KB
stdin
4 7
stdout
2