Source Code
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    long long a = 0, b = 0;
    cin >> n;

    for (int i = 0; i < n; i++) {
        int x;
        cin >> x;
        a += x;
    }
    while (n--) {
        int x;
        cin >> x;
        b += x;
    }
    cout << a - b << '\n';
}
Copy
A Game of Darts ahmad_salah
GNU G++17
50 ms
1.0 MB
Accepted