题目描述
In order to win over and get noticed by his favorite streamer Daenerys, Jon decides to donate a significant amount of money . Every donation made to Daenerys is of $at$ $least$ $1$ $beastcoin$ and is displayed on Daenerys's stream alongside any message written and is visible to every viewer.
After spotting that Daenerys had set out a target for the streaming day at minimum $X$ beastcoins, all her viewers would only donate amounts less than $X$ beastcoins. Jon decided to better all of them by straight out donating more than or equal to $X$ beastcoins. Further, he decides to write a message along with his special donation to leave her in awe. His message would be : "Crossing my donation with any other donation will only increase the value of my donation". By Crossing, he means to take the $XOR$ .
But even for all his intellectual brilliance, money doesn't grow on trees for Jon. After all he is an underpaid employee in his fancy big name MNC. Unlike Daenerys's daily cash cow who makes videos of how she donated carelessly to other people, Jon has a budget and in this case too, he is looking for the minimum donation he needs to make.
Can you tell Jon the minimum amount he needs to donate to Daenerys so that he is able to credibly put out the above comment alongside the donation in order to HOPEFULLY win her over.
-----Input Format-----
- First line contain an interger $T$, which denotes number of testcases. Next $T$ lines contain single interger $X$.
-----Output Format-----
- For every testcase print one integer, i.e. minimum donation Jon needs to make.
-----Constriants-----
- $1 \leq T \leq 100000$
- $2 \leq X \leq 10^{18}$
-----Sample Input-----
2
3
7
-----Sample Output-----
4
8
输入格式
见题面
输出格式
见题面