小唐唐 • 13小时前
using namespace std; int main() {
int a;
cin >> a;
if (a == 0) {
cout << 1 << endl;
return 0;
}
int count = 0;
int temp = a;
while (temp > 0) {
temp = temp / 2;
count++;
}
cout << count << endl;
return 0;
}
评论:
请先登录,才能进行评论