很有趣的一道题,我也是看了别人的题解才懂的,所以我就不写题解了,去看别人的吧23333
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <algorithm>
#include <deque>
#include <iostream>
#include <string>
#include <math.h>
using namespace std;
int t;
long long a;
long long ans;
int main() {
scanf("%d", &t);
while (t--) {
ans = 0;
scanf("%lld", &a);
while (a > 0) {
if (a & 1) {
ans++;
}
a >>= 1;
}
printf("%lld\n", (long long)pow(2, ans));
}
//system("pause");
return 0;
}