4->100
3->011
100 & 011 -> 0
#include<iostream>
using namespace std;
int main()
{
int n; //n>0
cin>>n;
if( n & (n-1) )
cout<<"no\n";
else
cout<<"yes\n";
return 0;
}
2024-01-08 10:11:46
4->100
3->011
100 & 011 -> 0
#include<iostream>
using namespace std;
int main()
{
int n; //n>0
cin>>n;
if( n & (n-1) )
cout<<"no\n";
else
cout<<"yes\n";
return 0;
}