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

using namespace std;

long long a[100001], b[100001];
int main() {
	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
334 ms
2.6 MB
Accepted