Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int ans = 1;
- while (ans < n)
- ans *= 2;
- cout << (ans == n ? "YES" : "NO");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement