提交时间:2024-07-18 10:49:47
运行 ID: 156683
#include<iostream> using namespace std; int t, n, cnt = 0; int main(){ cin >> t; while(t--){ cin >> n; cnt = 0; while(n){ cnt += n & 1; n >>= 1; } if(cnt == 1) cout << "Yes\n"; else cout << "No\n"; } return 0; }