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):
def main():
  can_get_cnt = int(input())
  jewel_values = list(map(int, input().split(" ")))
  jewel_costs = list(map(int, input().split(" ")))
  
  jewel_profits = []
  
  for i in range(0, len(jewel_values)):
    jewel_profits.append(jewel_values[i] - jewel_costs[i])
  
  sorted_jewel_profits = sorted(jewel_profits, reverse=True)
  
  ret = 0
  
  for i in range(0, can_get_cnt):
    if sorted_jewel_profits[i] > 0:
      ret = ret + sorted_jewel_profits[i]
    else:
      break
  
  
  print (ret)


main()

Solution (Python):
N = int(input())
v_list = list(map(int,input().split()))
c_list = list(map(int,input().split()))
ans = []
for i in range(N):
    if v_list[i] > c_list[i]:
        ans.append(v_list[i]-c_list[i])
print(sum(ans))

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

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 = input()
v = list(map(int, input().split()))
c = list(map(int, input().split()))
rtn = 0

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

print(rtn)

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):
    ans += max(0, V[i]-C[i])
print(ans)

Solution (Python):
n=int(input())
list_v=list(map(int, input().split()))
list_c=list(map(int, input().split()))
ans = 0
for i in range(n):
  ans_p = list_v[i] - list_c[i]
  if ans_p > 0:
    ans += ans_p
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):
    s = V[i] - C[i]
    if s > 0:
        ans += s

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 > 0:
        ans += v-c

print(ans)

Solution (Python):


import numpy


def main():
  input()
  values = numpy.array(list(map(int, input().split())))
  values -= numpy.array(list(map(int, input().split())))

  print(sum(values[values > 0]), flush=True)


if __name__ == '__main__':
  main()

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

dif = [V[i]-C[i] for i in range(N)]
dif.sort(reverse=True)
ans = 0
for i in range(N):
    if dif[i] > 0:
        ans += dif[i]
    else:
        break

print(ans)

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

Solution (Python):
n = int(input())
li = []
for i in range(2):
    tmp = list(map(int, input().split()))
    li.append(tmp)

ret = 0
for i in range(n):
    cost = li[0][i] - li[1][i]
    if cost > 0:
        ret += cost

print(ret)

Solution (Python):
_=input()
Vs=map(int,input().split())
Cs=map(int,input().split())
sub=[]
for v,c in zip(Vs,Cs):
    if v>c:
        sub.append(v-c)
print(sum(sub))

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):


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

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

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

ans = 0

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

print(ans)

Solution (Python):


n = int(input())
v = [int]*n
c = [int]*n
v = input().split()
c = input().split()

sum = 0

for i in range(n):
	xy = int(v[i]) - int(c[i])
	if xy > 0:
		sum += xy
		
print(sum)

Solution (Python):
N = int(input())
data_v = list(map(int, input().split()))
data_c = list(map(int, input().split()))

data = [0] * N
ans = 0
for i in range(N):
    data[i] = data_v[i] - data_c[i]
    if data[i] >= 0:
        ans += data[i] 

print(ans)

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
V = [int(_) for _ in stdin.readline().rstrip().split()]
C = [int(_) for _ in stdin.readline().rstrip().split()]
ans=0
for i in range(N):
    if V[i]-C[i] > 0:
        ans+=V[i]-C[i]
print(ans)

Solution (Python):
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: map(str, sys.stdin.readline().split())

n = ni()
v = nl()
c = nl()
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):
    if v[i] >= c[i]:
        ans = ans + (v[i] - c[i])

print(ans)

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

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

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

for i in range(N):
    sums.append(V[i]-C[i])

sums.sort()
sums.reverse()
cost = sums[0]
for i in range(1, N):
    if sums[i] < 0:
        break
    cost += sums[i]

print(max(0, cost))

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-1] - c[i-1] )> 0:
        score = score + (v[i-1] - c[i-1] )

print(score)

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

Solution (Python):
n = input()
V = input().split(" ")
C = input().split(" ")

n = int(n)
V_tmp = []
for v in V:
    V_tmp.append(int(v))
V = V_tmp
C_tmp = []
for c in C:
    C_tmp.append(int(c))
C = C_tmp
SA = []
for i in range(n):
    SA.append(V[i]-C[i])
max_ = 0
for i in range(n):
    if SA[i] >= 0:
        max_ += SA[i]
print(max_)

Solution (Python):
def main():
    _ = int(input())
    v = list(map(int, input().split()))
    c = list(map(int, input().split()))
    u = [v - c for v, c in zip(v, c) if v - c > 0]
    print(sum(u))


main()

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

X = [max(0, V[i]-C[i]) for i in range(N)]
print(sum(X))

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

Solution (Python):
N = int(input())
Value = list(map(int,input().split()))
Cost = list(map(int,input().split()))
count = 0
for i in range(len(Value)):
    if Value[i]-Cost[i] >= 0:
        count += Value[i]- Cost[i]

print(count)

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]:
    score += V[i] - C[i]

print(score)

Solution (Python):
import sys

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


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

print(R)

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
co = list(map(int,input().split()))
ans = 0

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

print(ans)

Solution (Python):
import numpy as np
N=int(input())
V=np.array(list(map(int,input().split())))
C=np.array(list(map(int,input().split())))
A=V-C
print(sum(A*(A>0)))

Solution (Python):
N = int(input())
V_lst = list(map(int, input().split()))
C_lst = list(map(int, input().split()))


P_lst = []
for i in range(N):
    P_lst.append(V_lst[i] - C_lst[i])
    
ans = 0    
for i in range(N):
    if P_lst[i] > 0:
        ans += P_lst[i]
        
print(ans)

Solution (Python):
def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def zeros(n): return [0]*n

class Debug():
    def __init__(self):
        self.debug = True
 
    def off(self):
        self.debug = False
 
    def dmp(self, x, cmt=''):
        if self.debug:
            if cmt != '':
                w = cmt + ': ' + str(x)
            else:
                w = str(x)
            print(w)
        return x

def prob():
    d = Debug()
    d.off()
    N = getInt()
    V = getIntList()
    C = getIntList()
    d.dmp((N),'N')
    d.dmp((V),'V')
    d.dmp((C),'C')
    smMarg = 0
    for i in range(N):
        marg = V[i]-C[i]
        if marg > 0:
            smMarg += marg
            
    return smMarg

ans = prob()
print(ans)

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

value_lst = input().split()
for i in range(N):
    value_lst[i] = int(value_lst[i])

cost_lst = input().split()
for i in range(N):
    cost_lst[i] = int(cost_lst[i])

plofit_lst = []
for i in range(N):
    plofit_lst.append(value_lst[i] - cost_lst[i])

plofit_lst.sort(reverse=True)

plofit_max = 0
for i in range(N):
    if plofit_lst[i] <= 0:
        break
    plofit_max += plofit_lst[i]

print(plofit_max)

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()))
print(sum(max(v[i]-c[i],0) for i in range(n)))

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

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

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(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]):
    ans +=V[i] - C[i]
print(ans)

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

Solution (Python):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,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_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
ans = 0

for v, c in zip(v_list, c_list):
    diff = v - c
    if diff > 0:
        ans += diff

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=ans+v[i]-c[i]

print(ans)

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

sa = list()
for v, c in zip(V, C):
    sa.append(v-c)

sa_p = [i for i in sa if i > 0]
print(sum(sa_p))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

print(sum([max(0,A[i] - B[i]) for i in range(N)]))

Solution (Python):


n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

ans = sum(max(x - y, 0) for x, y in zip(v, c))

print(ans)

Solution (Python):


a = []

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

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

print(sum)

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

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

x = 0
y = 0
mx = 0
l = [V[i]-C[i] for i in range(N)]
print(sum([ i for i in l if i>0 ]))

Solution (Python):
from sys import stdin
import math

n = stdin.readline().rstrip()

v = [int(x) for x in stdin.readline().rstrip().split()]
c = [int(x) for x in stdin.readline().rstrip().split()]





sum = 0
for i in range(len(v)):
    
    if c[i] < v[i]:
        sum += v[i] - c[i]

print(sum)

Solution (Python):
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
V = read_int()
C = read_int()
diff = [V[i] - C[i] for i in range(N)]
diff.sort(reverse=True)

def solve():
    ans = 0
    for i in range(N):
        if diff[i] >= 0:
            ans += diff[i]
        else: break
    return ans

if __name__ == "__main__":
    print(solve())

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

diff = [v[i] - c[i] for i in range(n)]
diff.sort(reverse=True)
M = 0
for i in range(n):
  if diff[i] > 0:
    M+=diff[i]
print(M)

Solution (Python):
import sys
 
N = map(int, raw_input().strip().split(" "))
V = map(int, raw_input().strip().split(" "))
C = map(int, raw_input().strip().split(" "))
a = 0

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

print(a)

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

v_c = []
for i in range(len(v)):
    v_c.append(v[i] - c[i])

s = 0
for vc in v_c:
    if vc > 0:
        s += vc

print(s)

Solution (Python):

N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
benefit=0
for value, cost in zip(V, C):
    bene=value-cost
    if bene >0:
        benefit=bene+benefit
print(benefit)

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

diff = [V[i] - C[i] for i in range(N)]

for i in range(N):
    if diff[i] < 0:
        diff[i] = 0

print(sum(diff))

Solution (Python):
import numpy as np

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

a=v-c

print(np.sum(a[a>0]))

Solution (Python):
import numpy as np
N=int(input())
V= np.array(list(map(int, input().split())))
C= np.array(list(map(int, input().split())))
d=V-C
plus=np.sum(d[d>0])
print(plus)

Solution (Python):
n = int(input())
value = list(map(int, input().split(' ')))
cost = list(map(int, input().split(' ')))
ans = 0
vc = []
for v,c in zip(value, cost):
  if v-c > 0:
    vc.append(v-c)
  else:
    pass
print(sum(vc))

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 = input().split()
C = input().split()
diff = [int(V[i]) - int(C[i]) for i in range(N) if int(V[i]) > int(C[i])]
if len(diff) != 0:
  print(sum(diff))
else:
  print(0)

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

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

ans = 0
for n in range(N):
	if 0 < V[n]-C[n]:
		ans += V[n]-C[n]

print(ans)

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

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

Solution (Python):
import numpy as np
n=1
N=[input() for i in range(n)]
V=list(map(int, input().split()))
C=list(map(int, input().split()))
samu=0

for i in range(len(V)):
  kari=V[i]-C[i]
  if kari>=0:
    samu=samu+kari

print(samu)

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

L = []
for i in range(N):
    L.append(V[i] - C[i])

L.sort(reverse=True)
ans = 0
for i in range(N):
    if ans > ans+L[i]:
        break
    else:
        ans += L[i]

print(ans)

Solution (Python):
import numpy as np 

N = int(input())
C = [int(i) for i in input().split()]
V = [int(i) for i in input().split()] 
X = 0
Y = 0
for n in range(N):
	if(C[n]>V[n]):
		X += C[n]
		Y += V[n]

print(X-Y)

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):
N = int(input())
V = input().split()
C = input().split()
Vnum=[]
Cnum=[]
res = 0
for i in range(N):
  Vnum.append(int(V[i]))
  Cnum.append(int(C[i]))
for i in range(N):
  if Vnum[i]>Cnum[i]:
    res += Vnum[i]-Cnum[i]
print(res)

Solution (Python):
n = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = 0
temp = []
for v,c in zip(V,C):
    temp.append(v-c)
temp.sort(reverse = True)
ans = 0

for t in temp:
    if t < 0:
        break
    ans += t
print(ans)

Solution (Python):
N = int(input())
values = list(map(int, input().split()))
costs = list(map(int, input().split()))

max_cost = 0
for i in range(N):
  if values[i] > costs[i]:
    max_cost += values[i] - costs[i]

print(max_cost)

Solution (Python):
n = int(raw_input())
vs = [int(i) for i in raw_input().split()]
cs = [int(i) for i in raw_input().split()]

res = 0

for ind, v in enumerate(vs):
    if cs[ind] > v:
        continue
    res += v - cs[ind]

print(res)

Solution (Python):
N = int(input())
Vs = [int(s) for s in input().split()]
Cs = [int(s) for s in input().split()]
VC = [v-c for v, c in zip(Vs, Cs)]
print(sum([vc for vc in VC if vc > 0]))

Solution (Python):

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

Solution (Python):
N = int(input())
V = input().split(" ")
V = [int(i) for i in V]
C = input().split(" ")
C = [int(i) for i in C]
list = [0]
ans = 0
X = 0
Y = 0
for i in range(N):
    if V[i] - C[i] > 0:
        X = V[i]
        Y = C[i]
        list.append(X - Y)
print(sum(list))

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):
    sub = v_list[i] - c_list[i]
    if sub>0:
        ans += sub
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):
  x = v[i] - c[i]
  if x >= 0:
    ans += x
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 = []
for i in input().split():
    V.append(int(i))

C = []
for j in input().split():
    C.append(int(j))

total = 0
for k in range(N):
    p = V[k] - C[k]
    if p > 0:
        total =total + p

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):
    if V[i] > C[i]:
        ans += V[i] - C[i]
print(ans)

Solution (Python):

if __name__ == '__main__':
    n = int(input())
    v = list(map(int, input().split()))
    c = list(map(int, input().split()))

    result = 0
    for i in range(n):
        sa = v[i] - c[i]
        if(sa > 0):
            result += sa
    
    print(int(result))

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

cost = 0

for t in range(len(V)):
    if V[t] > C[t]:
        cost += V[t] - C[t]
print(cost)

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

Solution (Python):
N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
sa=[]
for i in range(N):
    sa.append(V[i]-C[i])
sa_sort=sorted(sa,reverse=True)
ans=0
for i in range(N):
    if sa_sort[i]>0:
        ans=ans+sa_sort[i]
    else:
        break
print(ans)

Solution (Python):
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_list[i] - c_list[i] > 0:
        ans += v_list[i] - c_list[i]
        
print(ans)

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

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

Solution (Python):
import numpy as np

N = int(input())
values = list(map(int,input().split()))
costs = list(map(int,input().split()))
values_np = np.array(values)
costs_np = np.array(costs)

profits = values_np - costs_np
ans = 0

for p in profits:
    if p > 0:
        ans += p

print(ans)

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

d = []
for i in range(len(v)):
    d.append(max(v[i]-c[i], 0))

print(sum(d))

Solution (Python):
N = int(input())
listv = list(map(int, input().split()))
listc = list(map(int, input().split()))
sum1 = 0
for i in range(N):
    if(listv[i]>listc[i]):
        sum1 += listv[i]-listc[i]

print(sum1)

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

Solution (Python):
n=input()
n=int(n)
vll=input().split()
vll=[int(i) for i in vll]
cll=input().split()
cll=[int(i) for i in cll]
count=0
ofset=0
for i in range(n):
    x=vll[ofset]
    y=cll[ofset]
    z=x-y
    if z>=0:
        count+=z
    ofset+=1
print(count)

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())
V=[int(i) for i in input().split()]
C=[int(i) for i in input().split()]
Z=[V[i]-C[i] for i in range(N)]
ans=0
for i in range(N):
    if Z[i]>0:
        ans+=Z[i]
print(ans)

Solution (Python):
import sys



import numpy as np


"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    
    r, e, p = range, enumerate, print
    ip = IP()
    id = Idea()
    mod = 10 ** 9 + 7

    """この下から書いてね"""
    n = ip.I()
    v = ip.IL()
    c = ip.IL()
    v = np.array(v)
    c = np.array(c)
    o = v - c
    ans = 0
    for x in o:
        if x > 0:
            ans += x
    p(ans)

main()

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
x = 0
y = 0

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

print(x-y)

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
sum=0

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

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
cnt = 0

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

print(cnt)

Solution (Python):
import sys
def p(*a):
  s=" ".join(map(str,a))
  
  sys.stderr.write(s+"\n")


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


p(N)
p(V)
p(C)

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

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):
    k = V[i] - C[i]
    if k>0:
        ans+=k

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):
import numpy as np

N = input()
V = np.array([int(x) for x in input().split(" ")])
C = np.array([int(x) for x in input().split(" ")])

ans = V - C
idx = np.where(ans > 0)

print(ans[idx].sum())

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

num = 0
a = []
for i in range(len(v)):
    a.append(v[i] - c[i])

a.sort(reverse=True)

for b in a:
    if b <= 0:
        break
    num += b

print(num)

Solution (Python):
N = int(input())
lst_V = list(map(int, input().split()))
lst_C = list(map(int, input().split()))
lst_diff = [v - c for v, c in zip(lst_V, lst_C) if (v - c) > 0]
ans = sum(lst_diff)
print(ans)

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

v=[]
c=[]

line=input().split()

for i in range(n):
    v.append(int(line[i]))

line=input().split()

for i in range(n):
    c.append(int(line[i]))

sum=0

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

print(sum)

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


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

print(c)

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

D = [v - c for v, c in zip(V, C) if v - c > 0]

print(sum(D))

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

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()))

ans = 0

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

print(ans)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
count1 = 0
count2 = 0
for s in range(n):
	if a[s] > b[s]:
		count1 += a[s]
		count2 += b[s]
print(count1 - count2)

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

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_list, C_list):
    if v > c:
        ans += (v - c)

print(ans)

Solution (Python):
N = int(input())
values = list(map(int, input().split()))
costs = list(map(int, input().split()))
gains = [values[i] - costs[i] for i in range(N) if values[i] - costs[i] > 0]
print(max(sum(gains), 0))

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = input()
    obj = [int(i) for i in input().split()]
    costs = [int(i) for i in input().split()]
    print(sum([o - c for o, c in zip(obj, costs) if o - c > 0]))


if __name__ == "__main__":
    main()