Accepted
Code
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int tt; cin >> tt; while (tt--) {
int n; cin >> n;
int ans[4] = {n, 1, n + 1, 0};
cout << ans[n % 4] << '\n';
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1009 XOR Love
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-10-03 21:06:46
- Judged At
- 2024-11-11 02:44:22
- Judged By
- Score
- 100
- Total Time
- 35ms
- Peak Memory
- 1.445 MiB