Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define pb push_back
  4. #define F first
  5. #define S second
  6.  
  7. #define int long long
  8. main() {
  9. ios_base::sync_with_stdio(0);
  10. cin.tie(0);
  11. cout.tie(0);
  12. freopen("input.txt", "r", stdin);
  13. freopen("output.txt", "w", stdout);
  14. for (int n = 1; n <= 100; ++n){
  15. // int n;
  16. // cin >> n;
  17.  
  18. if (__builtin_popcountll(n) == 1 || (__builtin_popcountll(n) == 2 && n % 2 != 0)){
  19. cout << "Yes" << endl;
  20. }
  21. else cout << "No" << endl;
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement