提交时间:2024-08-19 20:57:00
运行 ID: 167938
#include <iostream> #include <cstdio> using namespace std; bool hh(int num) { if(num<=1) return false; while( (num&1) ==0) num = num>>1; if(num==1) return 1; num=num>>1; while( (num&1) ==0) num = num>>1; return num==1; } int main() { int n, t; scanf("%d", &n); for (int i = 0; i < n; i++){ scanf("%d", &t); if(hh(t)) printf("yes\n"); else printf("no\n"); } return 0; }