InnaSibirova

Степень

Nov 8th, 2019
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data