Labib And XOR of pair sum code : LXORR

solution : –

#include<bits/stdc++.h>
#define ll long long int
#define il for(int i=0;i<n;i++)
#define jl for(int j=i+1;j<n;j++)
#define lcin(n,a) for(int i=0;i<n;i++){cin>>a[i];}
#define sloop(s) for(int i=0;i<s.size();i++)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
int a[1000000];
int pow1(int n){
    int ans=1;
    for(int i=0;i<n;i++){
        ans*=26;
    }
    return ans;
}
int main() {
	IOS;    
	int t; cin>>t;
	while (t--){
		ll n; cin>>n;
        ll ans=0;
       /* for(int i=1;i<=n;i++){
            for(int j=1;j<=n;j++){
                ll sum=0;
                sum+=i+j;
                ans = ans^sum;
                //cout<<sum<<" ";
                //cout<<ans<<endl;
            }
            
        }
        cout<<ans<<endl;
        //cout<<(3^3)<<endl;
        //cout<<(((2^3)^3)^4)<<endl;  */
        int ans_for_2 = 6;
        if(n%4 == 1){
            cout<<2<<endl;
        }  
        else if(n%4 == 2){
            int times = n/4;
            cout<<ans_for_2+8*times<<endl;
        }
        else if(n%4 ==3){
            cout<<0<<endl;
        }
        else if(n%4==0){
            int times = n/4;
            cout<<8*times<<endl;
        }
	}
}