提交时间:2024-07-22 14:51:24

运行 ID: 158190

#include<bits/stdc++.h> using namespace std; long long t, n; bool check(int x){ if(x == 1)return true; while(x > 1){ if(x%2 != 0)return false; x /= 2; } return true; } int main(){ cin >> t; for(int i = 1; i <= t; i++){ cin >> n; long long ans1 = 1; bool p = 0; for(int j = 1; ans1 <= n; j++){ if(check(ans1) && check(n-ans1)){ cout << "yes\n"; p = 1; break; } ans1 *= 2; } if(!p)cout << "no\n"; } return 0; }