Блог пользователя 2ndSequence

Автор 2ndSequence, история, 4 года назад, По-английски

Hello guys.. i read the tutorial and the comments and i can't get it sadly so far.. so if anyone can give me a hint for this problem Magic Formula gonna be grateful too much. The thing that i can't get in the tutorial is the flipping of (i % 1) ^ (i % 2) ^ ..... (i % n) to (1 % i) ^ (2 % i) ^ ..... (3 % i) ... (n % i).. and WHY would he do so.. Thanks in advance.

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится
$$$Q = \oplus_{i=1}^{n} q_i = \oplus_{i=1}^{n} (p_i \oplus_{j=1}^{n} (i\ mod\ j)) =$$$
$$$(\oplus_{i=1}^{n} p_i)\ \oplus\ (\oplus_{i=1}^{n} \oplus_{j=1}^{n} (i\ mod\ j)) =$$$
$$$(\oplus_{j=1}^{n} p_j)\ \oplus\ (\oplus_{j=1}^{n} \oplus_{j=1}^{n} (i\ mod\ j)) =$$$
$$$\oplus_{j=1}^{n} (p_j \oplus_{i=1}^{n} (i\ mod\ j)) =$$$
$$$\oplus_{i=1}^{n} (p_i \oplus_{j=1}^{n} (j\ mod\ i)) = \oplus_{i=1}^{n} c_i$$$

because

$$$a\ \oplus\ b = b\ \oplus\ a$$$