提交时间:2024-08-19 08:26:26
运行 ID: 165950
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; for(int i = 1; i<=t; i++) { long long n; cin >> n; int sum = 0; if(n==1) { sum=114514; } while(n!=1) { if(n%2) { sum++; } n/=2; } if(sum<=1) { cout << "yes" << endl; } else { cout << "no" << endl; } } return 0; }