题解 | #牛牛的10类人#
牛牛的10类人
https://www.nowcoder.com/practice/232b7fc32fac4636819e31a7d7c960a3
def f(n):
n = bin(n)[2:]
zero = n.count('0')
one = n.count('1')
if (zero % 2 == 0) and (one % 2 != 0):
return '0'
elif (one % 2 == 0) and (zero % 2 != 0):
return '1'
elif (zero % 2 == 0) and (one % 2 == 0):
return '10'
return '100'
dummy = input()
nums = map(int,input().split())
lst = []
for i in nums:
lst.append(f(i))
print(' '.join(lst))


