/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 4ms 588.0 KiB
#2 Accepted 6ms 584.0 KiB
#3 Accepted 4ms 576.0 KiB
#4 Accepted 4ms 488.0 KiB
#5 Accepted 28ms 924.0 KiB
#6 Accepted 7ms 580.0 KiB
#7 Accepted 33ms 1.066 MiB
#8 Accepted 35ms 1.445 MiB

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