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

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int n;
	long long sum1, sum2;
	sum1 = sum2 = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		sum1+=a[i];
	}
	for (int i = 0; i < n; i++) {
		cin>>b[i];
		sum2 += b[i];
	}
	cout << sum1 - sum2;
	return 0;
}
Copy
A Game of Darts Mohamedmaher
GNU G++17
0 ms
0 KB
Compilation Error