mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-27 07:31:58 +00:00
23 lines
366 B
C++
23 lines
366 B
C++
|
#include <cmath>
|
||
|
#include <iostream>
|
||
|
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
using std::endl;
|
||
|
|
||
|
int t;
|
||
|
long long n;
|
||
|
|
||
|
int main() {
|
||
|
cin >> t;
|
||
|
while (t--) {
|
||
|
cin >> n;
|
||
|
if (floor(log2(n)) == log2(n) || floor(log2(n / 3.0)) == log2(n / 3.0)) {
|
||
|
cout << 0 << endl;
|
||
|
} else {
|
||
|
cout << 1 << endl;
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|