Problem:
 Score : 200 points    Problem Statement There are N gems. The value of the i -th gem is V_i .  You will choose some of these gems, possibly all or none, and get them.  However, you need to pay a cost of C_i to get the i -th gem.  Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid.  Find the maximum possible value of X-Y .      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq C_i, V_i \leq 50         Input Input is given from Standard Input in the following format:  N  V_1  V_2  ...  V_N  C_1  C_2  ...  C_N       Output Print the maximum possible value of X-Y .        Sample Input 1 3
10 2 5
6 3 4      Sample Output 1 5  If we choose the first and third gems, X = 10 + 5 = 15 and Y = 6 + 4 = 10 .
We have X-Y = 5 here, which is the maximum possible value.       Sample Input 2 4
13 21 6 19
11 30 6 15      Sample Output 2 6       Sample Input 3 1
1
50      Sample Output 3 0

Solution (Python):
N = int(input())
Vs = list(map(int, input().split()))
Cs = list(map(int, input().split()))

total = 0
for i in range(N):
    if Vs[i] - Cs[i] > 0:
        total += Vs[i] - Cs[i]

print(total)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = 0
for i in range(N):
    ans += max(V[i]-C[i], 0)
print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
for i in range(n):
    if v[i] > c[i]:
        ans += v[i] - c[i]

print(ans)

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = 0
for i in range(N):
    if V[i] > C[i]:
        ans += V[i]-C[i]
print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
res = 0
for i in range(n):
    if v[i]-c[i] > 0:
        res += v[i]-c[i]
print(res)

Solution (Python):
N = int(input())

V_list = list(map(int, input().split()))
C_list = list(map(int, input().split()))

ans = 0
for v,c in zip(V_list, C_list):
    if v > c:
        ans += v-c
print(ans)

Solution (Python):
from numpy import*
n=int(input())
*a,=map(int,input().split())
*b,=map(int,input().split())
c=array(a)-array(b)
print(sum([0]+list(c[c>0])))

Solution (Python):
m = int(input())
vlist = list(map(int, input().split()))
clist = list(map(int, input().split()))

ans = 0
for v, c in zip(vlist, clist):
  if v - c > 0:
    ans += v - c

print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
vans = 0
cans = 0
for i in range(n):
    if v[i]> c[i]:
        vans += v[i]
        cans += c[i]
print(vans - cans)

Solution (Python):
def solve():
  n = int(input())
  v = list(int(i) for i in input().split())
  c = list(int(i) for i in input().split())
  ans = 0
  for i in range(n):
    if v[i]-c[i] >= 0:
      ans += v[i]-c[i]
  print(ans)
solve()

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans = 0
for i in range(len(a)):
    if a[i] - b[i] > 0:
        ans += a[i] - b[i]
print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
s = 0
for i in range(n):
  s += max(v[i]-c[i],0)
print(s)

Solution (Python):

"""
Created on Sat Apr 27 20:57:27 2019

@author: Yamazaki Kenichi
"""

N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

ans = 0
for i in range(N):
    ans += V[i] - C[i] if V[i] > C[i] else 0
print(ans)

Solution (Python):
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
ans=0
for i in range(n):
    if v[i]-c[i]>0:
        ans+=v[i]-c[i]
print(ans)

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)

n = ip()                                     

v = [int(i) for i in input().split()]        








c = [int(i) for i in input().split()]
s = 0
for i in range(n):
    if v[i] > c[i]:
        s +=(v[i]-c[i])
print(s)

Solution (Python):
n,*t=map(int,open(0).read().split());print(sum((x-y)*(x>y)for x,y in zip(t[:n],t[n:])))

Solution (Python):
inpl = lambda: list(map(int,input().split()))
N = int(input())
V = inpl()
C = inpl()
step_u = lambda x: x if x > 0 else 0
B = [ step_u(V[i]-C[i]) for i in range(N) ]
print(sum(B))

Solution (Python):
n=int(input())
v=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]
x = 0
y = 0
for i in range(n):
    if v[i]>c[i]:
        x+=v[i]
        y+=c[i]
print(x-y)

Solution (Python):
N = int(input())
V = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

result = 0
for i in range(N):
    if(V[i]>C[i]):
        result +=V[i]-C[i]

print(int(result))

Solution (Python):
n = int(input())
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
sum = 0
for i in range(n):
    if v[i] > c[i]:
        sum += (v[i] - c[i])
print(sum)

Solution (Python):
N=int(input())
V=[int(x) for x in input().split()]
C=[int(x) for x in input().split()]
ans=0
for i in range(N):
  ans+=max(0,V[i]-C[i])
print(ans)

Solution (Python):






n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
for i in range(n):
    if v[i] - c[i] > 0 :
        ans += v[i] - c[i]
print(ans)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    a,b,t = LI()
    k = t//a
    print(k*b)
    return


def B():
    n = I()
    v = LI()
    c = LI()
    ans = 0
    for i in range(n):
        if v[i] > c[i]:
            ans += (v[i]-c[i])
    print(ans)
    return


def C():
    n = I()
    return


def D():
    n = I()
    return



if __name__ == "__main__":
    B()

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
for v, c in zip(V, C):
    if v-c > 0:
        ans += v-c
print(ans)

Solution (Python):
N = int(input())
v_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))

ans = 0

for i in range(N):
    v = v_list[i]
    c = c_list[i]

    if v > c:
        ans += v -c
print(ans)

Solution (Python):
N = int(input())
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

ans = 0
for i in range(N):
    if v[i] > c[i]:
        ans += v[i] - c[i]
print(ans)

Solution (Python):
def main():
	N = int(input())
	V = list(map(int, input().split()))
	C = list(map(int, input().split()))
	ans = 0
	for i in range(N):
		this_value = V[i] - C[i]
		if this_value > 0:
			ans += this_value

	print(ans)

if __name__ == '__main__':
	main()

Solution (Python):
import sys
import math

sys.setrecursionlimit(10000)
INF = float('inf')


def inp():
    return int(input())


def inl():
    return list(map(int, input().split()))


def inls():
    return input().split()


def Yesif(cond):
    print('Yes' if cond else 'No')


def YESIF(cond):
    print('YES' if cond else 'NO')


def yesif(cond):
    print('yes' if cond else 'no')



N = inp()
V = inl()
C = inl()

ans = 0
for v, c in zip(V, C):
    ans += max(0, v-c)
print(ans)

Solution (Python):
n = int(input())

v = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0

for i in range(n):
    if v[i]>c[i]:
        ans += v[i]-c[i]

print(ans)

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

x = [vv - cc for vv, cc in zip(v, c)]
y = filter(lambda a: a > 0, x)
print(sum(y))

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
for v, c in zip(V, C):
    ans += max(0, v - c)
print(ans)

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = 0
for i in range(N):
    ans += max(0,V[i]-C[i])
print(ans)

Solution (Python):
n = int(input())

v = list(map(int,input().split()))
c = list(map(int,input().split()))

score = 0
for i in range(n):
    if v[i] - c[i] > 0:
        score +=v[i] - c[i]

print(score)

Solution (Python):
N = int(input())
V = [int(_) for _ in input().split()]
C = [int(_) for _ in input().split()]

result = sum([max(v - c, 0) for v, c in zip(V, C)])

print(result)

Solution (Python):
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

n = int(input())

v = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = 0

for i in range(n):
    if v[i]-c[i] > 0:
        ans += v[i]-c[i]

print(ans)

Solution (Python):
N = int(input())
Vs = list(map(int, input().split()))
Cs = list(map(int, input().split()))

ans = sum([max(0, V-C) for V, C in zip(Vs, Cs)])
print(ans)

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    _str = str
    str = lambda x=b"": x if type(x) is bytes else _str(x).encode()


def main():
    n = int(input())
    v = readlist()
    c = readlist()

    res = 0
    for i in range(n):
        res += max(v[i] - c[i], 0)
    print(res)





BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._buffer = BytesIO()
        self._fd = file.fileno()
        self._writable = "x" in file.mode or "r" not in file.mode
        self.write = self._buffer.write if self._writable else None

    def read(self):
        if self._buffer.tell():
            return self._buffer.read()
        return os.read(self._fd, os.fstat(self._fd).st_size)

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self._buffer.tell()
            self._buffer.seek(0, 2), self._buffer.write(b), self._buffer.seek(ptr)
        self.newlines -= 1
        return self._buffer.readline()

    def flush(self):
        if self._writable:
            os.write(self._fd, self._buffer.getvalue())
            self._buffer.truncate(0), self._buffer.seek(0)


class ostream:
    def __lshift__(self, a):
        if a is endl:
            sys.stdout.write(b"\n")
            sys.stdout.flush()
        else:
            sys.stdout.write(str(a))
        return self


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", b" "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", b"\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
cout, endl = ostream(), object()

readline = sys.stdin.readline
readlist = lambda var=int: [var(n) for n in readline().split()]
input = lambda: readline().rstrip(b"\r\n")



if __name__ == "__main__":
    main()

Solution (Python):


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N = input()
V = map(int, raw_input().split())
C = map(int, raw_input().split())

ans = 0
for i in range(N):
    ans += max(0, V[i] - C[i])
print ans

Solution (Python):

import sys
INF = float("inf")


def solve(N: int, V: "List[int]", C: "List[int]"):
    ans = 0
    for v, c in zip(V, C):
        if v-c > 0:
            ans += v-c
    print(ans)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    V = [int(next(tokens)) for _ in range(N)]  
    C = [int(next(tokens)) for _ in range(N)]  
    solve(N, V, C)


if __name__ == '__main__':
    main()

Solution (Python):
a,b,c=int(input()),list(map(int,input().split())),list(map(int,input().split()));ans=0
for i in range(a):
  if b[i]>c[i]:ans+=b[i]-c[i]
print(ans)

Solution (Python):


n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))

output = 0

for i in range(n):
    if v[i] > c[i]:
        output += v[i] - c[i]

print(output)

Solution (Python):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = 0
for i in range(len(v)):
    if v[i]-c[i] > 0:
        ans = ans + v[i]-c[i]
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt=0
for i in range(n):
    if a[i]>b[i]:
        cnt+=a[i]-b[i]
print(cnt)

Solution (Python):
N=input()
r=0
Vs=[int(x) for x in input().split()]
Cs=[int(x) for x in input().split()]
for i in range(len(Vs)):
    if Vs[i]>Cs[i]:
        r+=Vs[i]-Cs[i]
print(r)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    N = II()
    V = LI()
    C = LI()
    ans = sum(max(v - c, 0) for v, c in zip(V, C))
    return ans

print(main())

Solution (Python):
n=int(input())
A=tuple(map(int,input().split()))
B=tuple(map(int,input().split()))
ans=0
for i in range(n):
    ans+=max(A[i]-B[i],0)
print(ans)

Solution (Python):
N = int(input())
V = [int(a) for a in input().split()]
C = [int(a) for a in input().split()]
s = 0
for i in range(N):
    s += max(V[i]-C[i], 0)
print(s)

Solution (Python):
N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))

ANS=0
for i in range(N):
    if V[i]>C[i]:
        ANS+=(V[i]-C[i])

print(ANS)

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())
    V = li_input()
    C = li_input()

    ans = 0

    for i in range(N):
        ans += max(0, V[i] - C[i])

    print(ans)


main()

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    a = LI()
    b = LI()
    r = 0
    for v,c in zip(a,b):
        r += max(0, v-c)

    return r


print(main())

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = 0
for i in range(N):
    if V[i] > C[i]:
        ans += V[i] - C[i]
print(ans)

Solution (Python):
n=int(input())
vs = list(map(int, input().split()))
cs = list(map(int, input().split()))
total = 0
for i in range(n):
    if vs[i] > cs[i]:
        total += vs[i]-cs[i]
print(total)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
x = 0
y = 0
for i in range(n):
    if a[i] > b[i]:
        x += a[i]
        y += b[i]
print(x-y)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = sum(max(0, x - y) for x, y in zip(v, c))
print(ans)

Solution (Python):
N = input()
V = map(int, input().split())
C = map(int, input().split())
ans = 0
for v, c in zip(V, C):
    if v >= c:
        ans += v - c
print (ans)

Solution (Python):
N = int(input())
V = [int(_) for _ in input().split()]
C = [int(_) for _ in input().split()]
ans = 0
for i in range(N):
    if V[i] - C[i] > 0:
        ans += V[i] - C[i]
print(ans)

Solution (Python):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += max(v[i]-c[i],0)

print(ans)

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

ans = 0
for v,c in zip(V,C):
    if v >= c:
        ans += v-c
print(ans)

Solution (Python):
n = int(input())
vvv = list(map(int, input().split()))
ccc = list(map(int, input().split()))
ans = 0
for v, c in zip(vvv, ccc):
    if v - c > 0:
        ans += v - c
print(ans)