#S1025. XOR

XOR

题目描述

两个整数 llrr

求 $l \oplus (l+1) \oplus (l+2) \oplus (l+3) \oplus \dots \oplus r$

\oplus 是异或符号,例如3$ \oplus $5 的值为6

在C++中异或符号是^,cout << 3^5,会输出6

3的二进制是011
5的二进制是101
异或是相同为0不同为1
3^5 就是 110

输入格式

从xor.in输入 输入两个数 l,rl, r

输出格式

输出到xor.out 输出 $l \oplus (l+1) \oplus (l+2) \oplus (l+3) \oplus \dots \oplus r$。

输入输出样例 #1

输入 #1

18 31

输出 #1

1

说明/提示

1lr108011 \leq l \leq r \leq 10^{801}

有20%的数据l和r在int范围内

l和r都是正整数

https://sanhai.sh3.ikuai7.com/p/2668/file/6.cpp?type=additional_file