提交时间:2024-07-17 10:53:51

运行 ID: 156375

#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"; } return 0; }