Hi,↵
↵
I just read the [editorial](http://codeforces.me/blog/entry/11944) of [Magic Formulas](http://codeforces.me/problemset/problem/424/C). I couldn't understand a particular formula in editorial.↵
↵
In editorial it is written that,↵
↵
$q_i = p_i \oplus (1\quad mod\quad i) \oplus (2\quad mod\quad i) \oplus ... \oplus (n\quad mod\quad i)$.↵
↵
But in question, the formula is given as,↵
↵
$q_i = p_i \oplus (i \quad mod \quad 1) \oplus (i \quad mod \quad 2) \oplus ... \oplus (i \quad mod \quad n)$.↵
↵
I am not able to understand how these formulas are equivalent. Please help me understanding what I am missing here.
↵
I just read the [editorial](http://codeforces.me/blog/entry/11944) of [Magic Formulas](http://codeforces.me/problemset/problem/424/C). I couldn't understand a particular formula in editorial.↵
↵
In editorial it is written that,↵
↵
$q_i = p_i \oplus (1\quad mod\quad i) \oplus (2\quad mod\quad i) \oplus ... \oplus (n\quad mod\quad i)$.↵
↵
But in question, the formula is given as,↵
↵
$q_i = p_i \oplus (i \quad mod \quad 1) \oplus (i \quad mod \quad 2) \oplus ... \oplus (i \quad mod \quad n)$.↵
↵
I am not able to understand how these formulas are equivalent. Please help me understanding what I am missing here.