3.1. 박인서 ¶
#include <cstdio> int main(int argc, char** argv) { setbuf(stdout, NULL); int TC; int test_case; scanf("%d", &TC); for(test_case = 1; test_case <= TC; test_case++) { int n, x=0; scanf("%d",&n); for(int i=0;i<n;i++){ int t; scanf("%d",&t); x=x^t; } printf("Case #%d\n", test_case); printf("%d\n", x); } return 0; }
3.2. 이원준 ¶
#include <stdio.h> int main(void) { setbuf(stdout, NULL); int TC; int test_case; scanf("%d", &TC); for (test_case = 1; test_case <= TC; test_case++) { int n; int temp; int ans = 0; scanf("%d", &n); for (int i = 0; i < n; i++){ scanf("%d", &temp); ans ^= temp; } printf("Case #%d\n", test_case); printf("%d\n", ans); } return 0; }