제출 #1146459

#제출 시각아이디문제언어결과실행 시간메모리
1146459NurislamXOR Sum (info1cup17_xorsum)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; //#define int long long typedef long long ll; signed main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; vector<int> a(n); for(int &i : a)cin >> i; ll ans = 0; for(int i = 0; i < n; i++){ for(int j = 0; j <= i; j++){ ans ^= (a[i] + a[j]) } } cout << ans << '\n'; };

컴파일 시 표준 에러 (stderr) 메시지

xorsum.cpp: In function 'int main()':
xorsum.cpp:21:45: error: expected ';' before '}' token
   21 |                         ans ^= (a[i] + a[j])
      |                                             ^
      |                                             ;
   22 |                 }
      |                 ~