关键是找出规律,其次再说贪心吧= =
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int t, cas = 0;
scanf("%d", &t);
while (t--)
{
__int64 a, b;
scanf("%I64d%I64d", &a, &b);
int cnt = 0;
while (a > b)
{
a -= (a % ((a >> 1) + 1));
cnt++;
}
printf("Case %d: %d\n", ++cas, cnt);
}
return 0;
}