/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 13ms 480.0 KiB
#2 Accepted 22ms 780.0 KiB
#3 Accepted 15ms 552.0 KiB
#4 Accepted 18ms 544.0 KiB
#5 Accepted 148ms 868.0 KiB
#6 Accepted 37ms 580.0 KiB
#7 Accepted 227ms 1.074 MiB
#8 Accepted 232ms 1.359 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-11-11 03:40:19
Judged By
Score
100
Total Time
232ms
Peak Memory
1.359 MiB