Advertisement
Guest User

Untitled

a guest
May 29th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin >> n;
  9.  
  10.     int ans = 1;
  11.     while (ans < n)
  12.         ans *= 2;
  13.  
  14.     cout << (ans == n ? "YES" : "NO");
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement