提交时间:2024-08-19 15:07:45

运行 ID: 166665

#include<iostream> #include<cmath> using namespace std; bool em(int a) { int j; for(j=1;j<=pow(2,31);j++) if(a==pow(2,j)) return true; else 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"; } return 0; }