Accepted
Code
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int t; cin >> t;
while (t--) {
int n; cin >> n;
if (n % 4 == 0)
cout << n << '\n';
else if (n % 4 == 1)
cout << 1 << '\n';
else if (n % 4 == 2)
cout << n + 1 << '\n';
else
cout << 0 << '\n';
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1009 XOR Love
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-03-26 09:28:16
- Judged At
- 2024-11-11 03:40:19
- Judged By
- Score
- 100
- Total Time
- 232ms
- Peak Memory
- 1.359 MiB