提交时间:2024-07-31 21:41:51

运行 ID: 159848

# include <bits/stdc++.h> using namespace std ; int main ( ) { int n , cnt = 0 , q ; cin >> q ; while ( q -- ) { cin >> n ; cnt = 0 ; if ( n == 1 ) { cout << "no" << endl ; continue ; } while ( n > 0 ) { if ( n % 2 ) { cnt ++ ; } n >>= 1 ; } if ( cnt <= 2 ) { cout << "yes" << endl ; } else { cout << "no" << endl ; } } return 0 ; }