5276: Mod, Or and Everything

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:14 解决:9

题目描述

You are given an integer n.

You are required to calculate (n mod 1) or (n mod 2) or ... or (n mod (n - 1)) or (n mod n).

The "or" operation means "bitwise OR".

输入

The first line contains an integer T(1≤T≤5000)representing the number of test cases.
For each test case, there is an integer n(1≤n≤1012)in one line.

输出

For each test case, print the answer in one line.

样例输入 复制

5
1
2
3
4
5

样例输出 复制

0
0
1
1
3