InnaSibirova

Степень

Nov 8th, 2019
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int a, b;
  5. cin >> a;
  6. if((a && !(a & (a - 1))) == 1) {
  7.     cout << "YES";
  8. }
  9. else {
  10.     cout << "NO";
  11. }
  12. }
Add Comment
Please, Sign In to add comment