Codeforces 1037A Packets

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/polanwind/article/details/83515839

题解过几天写。。。

#define  _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <algorithm>
#include <deque>
#include <iostream>
#include <string>
#include <math.h>

using namespace std;

int main() {
	int x;
	scanf("%d", &x);
	int cnt = 0;
	while (x > 0) {
		x >>= 1;
		cnt++;
	}
	printf("%d\n", cnt);
	//system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/polanwind/article/details/83515839