Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
257 B
0
Indexable
Never
for _ in range(int(input())):
    number = str(bin(int(input())).replace("0b", ""))
 
    if len(number) != 30:
        number += "0"*(30-len(number))
 
    counter = 0
 
    for i in number:
        if i == "1":
            counter+=1
    print(2**counter)