Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef ll long long;

int main(void){
  ll A, B;
  cin >> A >> B;

  // B-A+1が偶数
  //  -> Aが偶数
  //  -> Aが奇数
  // B-A+1が奇数
  //  -> Aが偶数
  //  -> Aが奇数

  ll pc = B-A+1;
  ll ret = 0;
  if(pc%2 == 0){
    if(A%2==0) for(ll i=0; i<pc/2; i++) ret ^= 1;
    else {
      for(ll i=0; i<pc/2 -1 ; i++) ret ^= 1;
      ret ^= A^B;
    }
  }else{
    if(A%2==0) {
      for(ll i=0; i<pc/2; i++) ret ^= 1;
      ret ^= B;
    }else{
      for(ll i=0; i<pc/2; i++) ret ^= 1;
      ret ^= A;
    };
  }
  cout << ret << endl;
  return 0;

}

Compiler output:
a.cc:3:9: error: 'll' does not name a type
    3 | typedef ll long long;
      |         ^~
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll A, B;
      |   ^~
a.cc:7:10: error: 'A' was not declared in this scope
    7 |   cin >> A >> B;
      |          ^
a.cc:7:15: error: 'B' was not declared in this scope
    7 |   cin >> A >> B;
      |               ^
a.cc:16:5: error: expected ';' before 'pc'
   16 |   ll pc = B-A+1;
      |     ^~~
      |     ;
a.cc:17:5: error: expected ';' before 'ret'
   17 |   ll ret = 0;
      |     ^~~~
      |     ;
a.cc:18:6: error: 'pc' was not declared in this scope
   18 |   if(pc%2 == 0){
      |      ^~
a.cc:19:22: error: expected ';' before 'i'
   19 |     if(A%2==0) for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                      ^~
      |                      ;
a.cc:19:28: error: 'i' was not declared in this scope
   19 |     if(A%2==0) for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                            ^
a.cc:19:41: error: 'ret' was not declared in this scope
   19 |     if(A%2==0) for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                                         ^~~
a.cc:21:13: error: expected ';' before 'i'
   21 |       for(ll i=0; i<pc/2 -1 ; i++) ret ^= 1;
      |             ^~
      |             ;
a.cc:21:19: error: 'i' was not declared in this scope
   21 |       for(ll i=0; i<pc/2 -1 ; i++) ret ^= 1;
      |                   ^
a.cc:21:36: error: 'ret' was not declared in this scope
   21 |       for(ll i=0; i<pc/2 -1 ; i++) ret ^= 1;
      |                                    ^~~
a.cc:22:7: error: 'ret' was not declared in this scope
   22 |       ret ^= A^B;
      |       ^~~
a.cc:26:13: error: expected ';' before 'i'
   26 |       for(ll i=0; i<pc/2; i++) ret ^= 1;
      |             ^~
      |             ;
a.cc:26:19: error: 'i' was not declared in this scope
   26 |       for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                   ^
a.cc:26:32: error: 'ret' was not declared in this scope
   26 |       for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                                ^~~
a.cc:27:7: error: 'ret' was not declared in this scope
   27 |       ret ^= B;
      |       ^~~
a.cc:29:13: error: expected ';' before 'i'
   29 |       for(ll i=0; i<pc/2; i++) ret ^= 1;
      |             ^~
      |             ;
a.cc:29:19: error: 'i' was not declared in this scope
   29 |       for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                   ^
a.cc:29:32: error: 'ret' was not declared in this scope
   29 |       for(ll i=0; i<pc/2; i++) ret ^= 1;
      |                                ^~~
a.cc:30:7: error: 'ret' was not declared in this scope
   30 |       ret ^= A;
      |       ^~~
a.cc:33:11: error: 'ret' was not declared in this scope
   33 |   cout << ret << endl;
      |           ^~~