#include<iostream>
using namespace std;
int T;
long long a,b;
int main(){
// freopen("in.txt","r",stdin);
cin>>T;
for(int k=1;k<=T;k++){
cin>>a>>b;
int i=0;
while(a>b){
i++;
if(a%2==0)
a=a/2-1;
else
a=a/2+1;
}
cout<<"Case "<<k<<": "<<i<<endl;
}
return 0;
}
FZU2147
最新推荐文章于 2018-04-15 22:12:40 发布