分析
上代码
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int a,b;
int func(int x)
{
if(x%4==3) return 0;
else if(x%4==1) return 1;
else
{
return func(x-1)^x;
}
}
int main()
{
cin>>a>>b;
cout<<(func(b)^func(a-1));
return 0;
}