Advertisement
SergeyPGUTI

4.2.10

Sep 29th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n=0;
  8.     cin>>n;
  9.     int k=1;
  10.     bool q=false;
  11.     while(k<=n)
  12.     {
  13.        if(k==n) q=true;
  14.        k= k << 1;
  15.     }
  16.     if (q) cout<<"YES";
  17.         else cout<<"NO";
  18.  return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement