提交时间:2023-08-22 08:36:34
运行 ID: 99118
#include <bits/stdc++.h> using namespace std; signed main() { int T; cin >> T; int n; bool flag; while(T--) { cin >> n; flag = false; for(int i = 0; i <= 30; i++) { for(int j = 0; j <= 30; j++) { if((1<<i)+(1<<j)==n) { cout << "yes" << endl; flag = true; break; } } if(flag)break; } if(!flag)cout << "no" << endl; } }