Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
void solve()
{
int n; cin>>n;
if(n%4==0){
cout<<n<<endl;
}
else if(n%4==1||n==1){
cout<<1<<endl;
}
else if(n%2==2||n==2){
cout<<n+1<<endl;
}
else 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
- 2024-10-03 14:22:02
- Judged At
- 2024-11-11 02:51:28
- Judged By
- Score
- 0
- Total Time
- 19ms
- Peak Memory
- 564.0 KiB