提交时间:2024-07-17 11:04:43
运行 ID: 156388
#include<iostream> using namespace std; int t, n, cnt = 0, b = false; int main(){ cin >> t; while(t--){ cin >> n; cnt = 0; if(n > 1) b = true; while(n){ cnt += n & 1; n >>= 1; } if(cnt == 2 || (cnt == 1 && b)) cout << "yes\n"; else cout << "no\n"; b = false; } return 0; }