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

#define all(x) x.begin(),x.end()
#define sc(x) scanf("%d",&x)
#define scl(x) scanf("%lld",&x)
#define LL long long
#define LD long double
#define pb push_back
#define F first
#define S second


const double PI=3.1415926535897932384626433;
const int KL=1e6;
const LL MOD=1e9+7;


using namespace std;
int main ()
{
    int n ;sc(n) ;
    LL a[200100],b[200100] ;
    for (int i=0;i<n;i++)
    {
        scl(a[i]) ;
    }
 for (int i=0;i<n;i++)
    {
        scl(b[i]) ;
    }
LL ans =0 ;
 for (int i=0;i<n;i++)
    {
       ans += (a[i]-b[i]) ;
    }
printf("%lld\n",ans) ;



}
Copy
A Game of Darts alialsuleman
GNU G++17
61 ms
4.3 MB
Accepted