/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 7ms 560.0 KiB
#2 Accepted 11ms 576.0 KiB
#3 Accepted 8ms 564.0 KiB
#4 Accepted 10ms 576.0 KiB
#5 Accepted 78ms 908.0 KiB
#6 Accepted 19ms 604.0 KiB
#7 Accepted 115ms 1.02 MiB
#8 Accepted 120ms 1.406 MiB

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-03-26 09:28:16
Judged By
Score
100
Total Time
120ms
Peak Memory
1.406 MiB