Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int L,R;
- cin>>L>>R;
- int n=(R-L)/2+1;
- if(L%2==1&&R%2==1)
- --n;
- if(L==R)
- if(L%2)
- cout<<0;
- else
- cout<<1;
- else
- cout<<1ULL*n*n;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement