시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 191 89 59 71.084%

문제

S에서 F까지의 모든 정수를 XOR한 값은 무엇일까?

입력

입력의 첫 번째 줄에는 테스트 케이스의 개수 T(1 ≤ T ≤ 1000)가 주어진다.

다음 T 개의 줄에는 두 개의 정수 SF가 주어진다. (1 ≤ SF ≤ 1 000 000 000)

출력

각 테스트 케이스마다 S에서 F까지의 모든 정수를 XOR한 값을 출력한다.

예제 입력 1

5
3 10
5 5
13 42
666 1337
1234567 89101112

예제 출력 1

8
5
39
0
89998783
W3sicHJvYmxlbV9pZCI6IjEwNDY0IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiWE9SIiwiZGVzY3JpcHRpb24iOiI8cD48aW1nIGFsdD1cIlwiIHNyYz1cIlwvdXBsb2FkXC9pbWFnZXMyXC9YT1IucG5nXCIgc3R5bGU9XCJmbG9hdDpyaWdodDsgaGVpZ2h0OjUwcHg7IHdpZHRoOjEwMHB4XCIgXC8+IDxlbT5TPFwvZW0+XHVjNWQwXHVjMTFjIDxlbT5GPFwvZW0+XHVhZTRjXHVjOWMwXHVjNzU4IFx1YmFhOFx1YjRlMCBcdWM4MTVcdWMyMThcdWI5N2MgWE9SXHVkNTVjIFx1YWMxMlx1Yzc0MCBcdWJiMzRcdWM1YzdcdWM3N2NcdWFlNGM/PFwvcD5cclxuIiwiaW5wdXQiOiI8cD5cdWM3ODVcdWI4MjVcdWM3NTggXHVjY2FiIFx1YmM4OFx1YzlmOCBcdWM5MDRcdWM1ZDBcdWIyOTQgXHVkMTRjXHVjMmE0XHVkMmI4IFx1Y2YwMFx1Yzc3NFx1YzJhNFx1Yzc1OCBcdWFjMWNcdWMyMTggPGVtPlQ8XC9lbT4oMSAmbGU7IDxlbT5UPFwvZW0+ICZsZTsgMTAwMClcdWFjMDAgXHVjOGZjXHVjNWI0XHVjOWM0XHViMmU0LjxcL3A+XHJcblxyXG48cD5cdWIyZTRcdWM3NGMgPGVtPl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