/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param n int整型
* @return bool布尔型
*
* C语言声明定义全局变量请加上static,防止重复定义
*/
#include <stdbool.h>
bool poweroftwo(int n ) {
// write code here
for (int i = 0; i < 32; i++)
{
if ((1 << i) == n)
return true;
}
return false;
}

京公网安备 11010502036488号