Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int ln2(int64_t n){
- while(n > 1){
- if(n%2 == 0){
- n /= 2;
- } else{
- return -1;
- }
- }
- return 1;
- }
- int main(){
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- int t;
- cin >> t;
- while(t--){
- int64_t n;
- cin >> n;
- if(ln2(n) == 1){
- cout << "NO\n";
- } else{
- cout << "YES\n";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement