提交时间:2024-08-19 15:27:19

运行 ID: 166860

#include<iostream> #include<cmath> using namespace std; bool em(int a) { for(int j=1;j<=pow(2,31);j++) if(a==pow(2,j)) return true; else if(a!=pow(2,j)) return false; } int main() { int T,s[T],i; cin>>T; for(i=1;i<=T;i++){ cin>>s[i]; if(em(s[i])==true){ cout<<"yes"<<endl; } else cout<<"no"<<endl; } return 0; }