淘汰赛问题题目:Our school is pl
21 查阅
参考答案:
其实就是计算一个数是2的几次方。
\r\n
#include <iostream>
using namespace std;
long calculate(long test)
{
long ret = 0;
bool is2square = true;
while(test!=1)
{
if(test % 2)
is2square = false;
test /= 2;