We share codes. We love code. We respect programming

LightBlog

Breaking

LightBlog

Sunday 19 March 2017

Codeforces Bear and Big Brother Solution

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,cnt=0;
    cin >> a >> b;
    while(b>=a)
    {
        a *= 3;
        b *= 2;
        cnt++;
    }
    cout << cnt << endl;
    return 0;
}

No comments:

Post a Comment

Adbox