{"problem":{"name":"B. Xor Sums","description":{"content":"Diego knows that the sum of all integers between $1$ and $N$ is $frac(N (N + 1), 2)$. However, he is wondering how to compute the exclusive or of all integers between $1$ and $N$. Exclusive or is als","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10240B"},"statements":[{"statement_type":"Markdown","content":"Diego knows that the sum of all integers between $1$ and $N$ is $frac(N (N + 1), 2)$. However, he is wondering how to compute the exclusive or of all integers between $1$ and $N$.\n\nExclusive or is also known as xor. Most programming languages represent it with the character _^_.\n\nFirst, a single integer, $T$ $(1 <= T <= 10^5)$: the number of test cases.\n\nThen $T$ lines, each of which contains a single integer, $N$ $(1 <= N <= 10^(18))$.\n\nFor each test case output a line containing a single integer: the exclusive or of every number between $1$ and $N$.\n\n## Input\n\nFirst, a single integer, $T$ $(1 <= T <= 10^5)$: the number of test cases.Then $T$ lines, each of which contains a single integer, $N$ $(1 <= N <= 10^(18))$.\n\n## Output\n\nFor each test case output a line containing a single integer: the exclusive or of every number between $1$ and $N$.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ N_k \\in \\mathbb{Z} $ be a positive integer.\n\n**Constraints**  \n1. $ 1 \\le T \\le 10^5 $  \n2. For each $ k $, $ 1 \\le N_k \\le 10^{18} $\n\n**Objective**  \nFor each test case $ k $, compute:  \n$$\nX_k = \\bigoplus_{i=1}^{N_k} i\n$$  \nwhere $ \\oplus $ denotes the bitwise XOR operation.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10240B","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}