1. 程式人生 > >11636 Hello World!

11636 Hello World!

題目傳送門

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int main(void)
{
	int N;
	int k = 0;

	while (scanf("%d", &N) != EOF && N > 0)
	{//碰到負數就結束,而不是碰到-1結束
		int coun = 0;
		int i = 1;

		for (i = 1; i < N; i *= 2)coun++;
		//if (i == N) { printf("Case %d: %d\n", ++k, coun); continue; }
		printf("Case %d: %d\n", ++k, coun);
	}

	return 0;
}