#include<stdio.h>
int main()
{
int N, count, r, i = 1;
while(scanf("%d", &N) && N>0 && N<10001)
{
if(N<0)
{
break;
}
count = 0, r = 1;
while(r<N)
{
r = r+ r;
count ++;
}
printf("Case %d: %d\n",i , count);
i++;
}
return 0;
}
int main()
{
int N, count, r, i = 1;
while(scanf("%d", &N) && N>0 && N<10001)
{
if(N<0)
{
break;
}
count = 0, r = 1;
while(r<N)
{
r = r+ r;
count ++;
}
printf("Case %d: %d\n",i , count);
i++;
}
return 0;
}
Comments
Post a Comment