|
||||||||||
Mod, Or and EverythingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2517 Accepted Submission(s): 1152 Problem Description 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". Input The first line contains an integer $T(1\le T\le 5000)$representing the number of test cases. For each test case, there is an integer $n(1\le n\le 10^{12})$in one line. Output For each test case, print the answer in one line. Sample Input
Sample Output
Source | ||||||||||
|