Source Code
#include <bits/stdc++.h>

using namespace std;

int main() {
    //freopen("cubes.in", "r", stdin);
    //freopen ("output.txt","w",stdout);
    int t = 1;
    // cin >> t;
    for (int j = 0; j < t; j++) {
        int n;
        cin >> n;
        long long a = 0, b = 0;
        for(int i = 0; i < n; i++) {
            int x;
            cin >> x;
            a += x;
        }
        for(int i = 0; i < n; i++) {
            int x;
            cin >> x;
            b += x;
        }
        cout << (a - b);
    }
    return 0;
}
Copy
A Game of Darts Fattah
GNU G++17
48 ms
820 KB
Accepted