#sn1209. 习题2.1.13 大区间异或和
习题2.1.13 大区间异或和
题目描述
我们定义
为整数的异或和。
现在给定,求
输入格式
两个整数
输出格式
一个整数表示答案
样例数据
input
2 4
output
5
input
123 456
output
435
input
123456789012 123456789012
output
123456789012
数据规模与约定
时间限制:
空间限制:
我们定义
f(A,B)为整数A,A+1,A+2…B的异或和。
现在给定A,B,求 f(A,B)
两个整数A,B
一个整数表示答案
input
2 4
output
5
input
123 456
output
435
input
123456789012 123456789012
output
123456789012
0≤A≤B≤1012
时间限制:2s
空间限制:256MB
By signing up a code-fans universal account, you can submit code and join discussions in all online judging services provided by us.