After years, maybe 9 or 10, of being away from competitive programming, I'm finally back, and glad :)
I love competitive programming. I missed it. I missed those days in 2013 and 2014 when I would be listening to music in the background and would be coding. Finally, I'm back. This time I think I have brought with me the different skill set: Linux and Emacs.
Anyway, let's get to the business. This is the solution for Codeforces Round 405 (rated, Div. 2, based on VK Cup 2017 Round 1) - 791 A Bear and Big Brother.
- #include <stdio.h>
-
- int main() {
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
-
- int a, b, c=0;
- scanf("%d %d", &a, &b);
- while(a<=b) {
- a=a*3, b=b*2, c++;
- }
- printf("%d\n", c);
- return 0;
- }
No comments:
Post a Comment