提交时间:2024-08-19 22:12:14
运行 ID: 168071
#include <string> #include <cstdio> #include <iostream> #include <cmath> using namespace std; string f(int n){ for (int i=0;i<=n;i++){ for (int j=0;j<=n;j++){ if (pow(2,i)+pow(2,j)==n) return "yes"; } } return "no"; } int main(){ int t,n; scanf("%d",&t); for (int i=0;i<t;i++){ scanf("%d",&n); cout<<f(n)<<endl; } return 0; }