您的位置:首页 > 其它

【UVa】11636 - Hello World!

2016-12-02 23:46 357 查看
Problem here

Solution

water water water water ~~~

#include <iostream>
using namespace std;

int main(){

int n;
int kase = 1;
while(cin >> n){
if(n < 0)
break;

int ans = 1;
int cnt = 0;
while(ans < n){
ans = ans * 2;
cnt++;
}
cout << "Case " << kase++ << ": " << cnt << endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  uva 算法