Accepted
Code
#include<bits/stdc++.h>
using namespace std;
void solve()
{
int n; cin>>n;
int r=n%4;
if(r==0) cout<<n<<endl;
else if(r==1) cout<<1<<endl;
else if(r==2) cout<<n+1<<endl;
else if(r==3) cout<<0<<endl;
}
int main()
{
int t; cin>>t; while(t--) solve();
}
Information
- Submit By
- Type
- Submission
- Problem
- P1009 XOR Love
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2023-12-04 17:09:24
- Judged At
- 2023-12-26 21:06:00
- Judged By
- Score
- 100
- Total Time
- 119ms
- Peak Memory
- 1.562 MiB