Advertisement
a53

perechipare

a53
Oct 25th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int L,R;
  7. cin>>L>>R;
  8. int n=(R-L)/2+1;
  9. if(L%2==1&&R%2==1)
  10. --n;
  11. if(L==R)
  12. if(L%2)
  13. cout<<0;
  14. else
  15. cout<<1;
  16. else
  17. cout<<1ULL*n*n;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement