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())
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 = input()
V = map(int, raw_input().split())
C = map(int, raw_input().split())
print sum(v-c for v, c in zip(V,C) if v-c>0)

Solution (Python):
import numpy as np 
N = int(input())
V = np.asarray([int(i) for i in input().split()])
C = np.asarray([int(i) for i in input().split()])
diff = V-C
print(diff[diff>0].sum())

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

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

out=0

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


print(out)

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

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

Solution (Python):

def solve():
    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)


if __name__ == '__main__':
    solve()

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

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

print(sum(Z))

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
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]>0):
        ans += v[i]-c[i]
print(ans)

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

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

qtd = 0
for i in range(n):
    k = gem[i]-price[i] 
    if(k > 0):
        qtd += k
print(qtd)

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

d_ = [V_[i] - C_[i] for i in range(N) if V_[i]-C_[i] > 0]



print(sum(d_))

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

print(B)

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 > 0:
        s += v - c 
print(s)

Solution (Python):
inp = int(input())
v = [int(d) for d in input().split()]
c = [int(d) for d in input().split()]
k = 0

for s in range(inp):
    if v[s] >= c[s]:
        k += v[s] - c[s]
print(k)

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

Solution (Python):
N=int(input())
a=list(map(int,input().split(" ")))
b=list(map(int,input().split(" ")))
r=0

for i,x in enumerate(a):
  buf=x-b[i]
  if buf>0:
    r+=buf

print(r)

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

Solution (Python):
n = int(input())
vlist = [int(_) for _ in input().split()]
clist = [int(_) for _ in input().split()]

result = 0
for i in range(n):
  if vlist[i] > clist[i]:
    result = result + vlist[i] - clist[i]

print(result)

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

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

a = [0]*n

for i in range(n):
    a[i] = v[i] - c[i]

a.sort(reverse=True)


ans = 0
for i in a:
    if i > 0:
        ans += 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):
"""
python3 main.py < input.txt
"""
import math
import itertools as it
import heapq
"""
A,B,T=map(int, input().split())
print(int(math.floor((T+0.5)/(A))*B))
"""

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

Solution (Python):
import math
N = int(input())
V = list(map(int, input().strip().split()))
C = list(map(int, input().strip().split()))
sum = 0
for i in range(0, N):
    if V[i] > C[i]:
        sum += V[i]-C[i]
print("{}".format(sum))

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

Solution (Python):



def main():
    N = input()
    V = map(int, input().split())
    C = map(int, input().split())
    VCdiff = [v - c for v, c in zip(V, C)]
    a = filter(lambda x: 0 <= x, VCdiff)
    print(sum(list(a)))


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
v = list(map(int, input().split(' ')))
c = list(map(int, input().split(' ')))
v_sum = sum(v)
c_sum = sum(c)
ans = v_sum - c_sum


diff = []
for i in range(n):
    diff.append(v[i] - c[i])

diff = sorted(diff)

for num in diff:
    if num < 0:
        ans -= num

print(max(ans, 0))

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline




def main():
	N = int(input())
	V = input().split()
	V = [int(s) for s in V]
	C = input().split()
	C = [int(s) for s in C]

	VAL = []
	for i in range(N):
		a, b = V[i], C[i]
		VAL.append((a, b))

	ass = 0
	bss = 0
	for i, val in enumerate(VAL):
		a, b = val
		if b < a:
			ass += a
			bss += b

	print(ass-bss)
	
	
if __name__ == "__main__":
	main()

Solution (Python):
n=int(input())
kachi=list(map(int,input().split()))
cost=list(map(int,input().split()))
delta=[kachi[i]-cost[i] for i in range(n)]
sum=0
delta.sort(reverse=True)
j=0
while(delta[j]>0):
  sum+=delta[j]
  j+=1
  if j==n:
    break
print(sum)

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

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

print(sum(v-c for v, c in zip(V, C) if v - c > 0))

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

Solution (Python):
n = int(input())
vi = list(map(int,input().split()))
ci = list(map(int,input().split()))

vci = []
res = 0
for i in range(n):
	if(vi[i] - ci[i]) > 0:
		res += vi[i]-ci[i]

print(res)

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

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


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

print(money)

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

tmp = [0 for _ in range(N)]

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

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

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

answer = 0
for i in range(n):
    if v_list[i] - c_list[i] > 0:
        answer += v_list[i] - c_list[i]
print(answer)

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
x = [v[i] - c[i] for i in range(n)]
ans = 0
for xi in x:
    if xi > 0:
        ans += xi
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):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
result = []
for i in range (N):
    temp = V[i]-C[i]
    result.append(temp)
    
ans = 0
for j in range (len(result)):
    if result[j]>=0:
        ans += result[j]
print(ans)

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(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
for i in range(N):
    v = V[i]
    c = C[i]
    if v - c > 0:
        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):
    res = V[i]-C[i]
    if res>0:
        ans += res
        
print(ans)

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

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

Solution (Python):
n = int(input())
vList = list(map(int, input().split()))
cList = list(map(int, input().split()))

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

print(ans)

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

Solution (Python):
from sys import stdin
N=int(stdin.readline().rstrip())
data_V=[int(x) for x in stdin.readline().rstrip().split()]
data_C=[int(x) for x in stdin.readline().rstrip().split()]
ans=0
for ind, i in enumerate(data_V):
    if i - data_C[ind] > 0:
        ans+=(i - data_C[ind])
print(ans)

Solution (Python):

"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""


"""
Created on Sat Apr 13 09:53:12 2019

@author: Owner
"""

import numpy as np
import sys
""""
import collections
import scipy.misc
import sys
import numpy as np
import math
from operator import itemgetter
import itertools
import copy
import bisect
"""


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())


dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

add = 1 
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)


li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    


org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)



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


def main():
    P = [0]*N
    for n in range(N):
        P[n] = V[n]-C[n]
    P.sort(reverse = True)
    res=0
    for n in range(N):
        if P[n] <= 0:
            break
        else:
            res+=P[n]
            
    print(res)
    
if __name__ == '__main__':
    main()

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 = [int(i) for i in input().split(' ')]

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

sa = [i[0] - i[1] for i in zip(V, C)]
print(sum(filter(lambda x: x > 0, sa)))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0
for i, j in zip(a,b):
    if i - j > 0:
        ans += i - j

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()))
ct=0
for i in range(n):
    if v[i]>c[i]:
        ct+=v[i]-c[i]
print(ct)

Solution (Python):
N = int(input())
Vlist = list(map(int, input().split()))
Clist = list(map(int, input().split()))
V_Clist = [Vlist[i] - Clist[i] for i in range(N)]
ret = 0
for vc in V_Clist:
    if vc > 0:
        ret += vc
print(ret)

Solution (Python):
R = lambda: map(int, input().split())
input()
print(sum(x - y for x, y in zip(R(), R()) if x > y))

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

print(ans)

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

Solution (Python):
n = int(input())
v = []
c = []

v = [ int(e) for e in input().split(" ")]
c = [ int(e) for e in input().split(" ")]

value=[]

for i in range(n):
    value.append(v[i] -c[i])

result = 0

for i in value:
    if(i > 0):
        result += i

print(result)

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 = map(int, input().split())
C = map(int, input().split())

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

print(ans)

Solution (Python):
n = int(input())
v = [int(m) for m in input().split()]
c = [int(m) for m 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):
    tmp = V[i] - C[i]
    if tmp > 0:
        ans += tmp
print(ans)

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

ans = sum(map(lambda i: max(v[i] - c[i], 0), range(n)))
print(ans)

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

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

Solution (Python):
import sys
input=sys.stdin.readline
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()))
count = 0
for i in range(N):
  count += max(0,V[i]-C[i])
print(count)

Solution (Python):
N = int(input())
V = list(map(int, input().split(' ')))
C = list(map(int, input().split(' ')))
count = 0
for i, j in zip(V, C):
    result = i - j
    if result > 0:
        count += result
print(count)

Solution (Python):
import sys
from collections import Counter

n = int(input())
v_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
t_list = []
ans = 0

for i in range(n):
    t_list.append(v_list[i] - c_list[i])

for i in t_list:
    if i < 0:
        continue
    ans += i

print(ans)

Solution (Python):


N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
VC = [V[i] - C[i] for i in range(N)]
VC = [vc for vc in VC if vc>0]

print(sum(VC))

Solution (Python):
n = int(input())
V = [int(v) for v in input().split()]
C = [int(c) for c in 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 = list(map(int, input().split()))
C_list = list(map(int, input().split()))
diff_list = []
for i in range(len(V_list)):
    if V_list[i] - C_list[i] > 0:
        diff_list.append( V_list[i] - C_list[i])

print(sum(diff_list))

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

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

diff_val = []
for v, c in zip(V, C):
    diff_val.append(v - c)
ans = 0

for d in diff_val:
    if d > 0:
        ans += d
print(ans)

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

print(sum(ans))

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

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

print(s)

Solution (Python):
n = int(input())
vn = list(map(int, input().split(' ')))
cn = list(map(int, input().split(' ')))

total = 0
for v, c in zip(vn, cn):
  if v > c:
    total += v - c
    
print(total)

Solution (Python):
N = int(input())
V_array = list(map(int, input().split()))
C_array = list(map(int, input().split()))


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

Solution (Python):
n = int(input())
v_data = list(map(int,input().split()))
c_data = list(map(int,input().split()))
res = 0

for i in range(n):
  if v_data[i] - c_data[i] > 0:
    res += v_data[i] - c_data[i]
print(res)

Solution (Python):
import sys
input = sys.stdin.readline
n = int(input())
v = input().split()
c = input().split()
s = []
for i in range(n):
    v[i] = int(v[i])
    c[i] = int(c[i])
    s.append(v[i] - c[i])
s.sort(reverse=True)
l = 0
sum = 0
while (l < n and s[l] > 0):
    sum += s[l]
    l += 1
print(sum)

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()))
saidai = 0
for i in range(n):
  if v[i]-c[i]>0:
    saidai += v[i]-c[i]
print(saidai)

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

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

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

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

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

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

kati = []
for i in range(n):
    kati.append(v[i]-c[i])

count = 0

for k in kati:
    if k>0: count += k

print(count)

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 = [int(i) for i in input().split(' ')]
c = [int(i) for i in input().split(' ')]

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

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N=INT()
V=LIST()
C=LIST()

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

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=list(map(int,input().split()))
C=list(map(int,input().split()))

ans=0

for i in range(0,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()))

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

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

x = 0
y = 0

ans = 0

for i in range(0, n):
    xx = v[i] - c[i]

    if xx > 0:
        ans += xx


print(ans)

Solution (Python):
N = int(input())
vs = list(map(int, input().split()))
cs =  list(map(int, input().split()))
m =[(v-c) for v,c in zip(vs, cs)]
ans = 0
for i in m:
    if i >= 0:
        ans += i
print(ans)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
X = []
for i in range(N):
  X.append(V[i]-C[i])

s = 0
for i in range(N):
  if X[i] > 0:
    s += X[i]
print(s)

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



ans = 0

for i in range(n):
	if((int(v[i]) - int(c[i])) > 0):
		ans += int(v[i]) - int(c[i])
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]:
        ans += V[i]-C[i]

print(ans)

Solution (Python):
N = int(input())
V_list = list(map(int, input().split()))
C_list = list(map(int, input().split()))
VC_list = sorted([v-c for v, c in zip(V_list, C_list)], reverse=True)
res = 0
for i in VC_list:
    if i > 0:
        res += i
    else:
        break
print(res)

Solution (Python):
N = int(input())
V_list = list(map(int,input().split()))
C_list = list(map(int,input().split()))


value = 0

for i in range(N):
    s = V_list[i] - C_list[i]
    if s > 0:
        value += s
        
print(value)

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 sys

















input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



N = ii()
V = lmi()
C = lmi()
good = [V[i] - C[i] for i in range(N)]
good.sort()

cnt = 0
for i in range(N):
    if good[i] >= 0:
        cnt += good[i]

print(cnt)

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

Solution (Python):
def vc():
  n = int(input())
  vs = list(map(int, input().split()))
  cs = list(map(int, input().split()))

  res = 0
  for v, c in zip(vs, cs):
    if v - c > 0:
      res += v - c
  return res
  
print(vc())

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

out = 0
for n in range(N):
  value = V[n] - C[n]
  if value > 0:
    out += value

print(out)

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

Solution (Python):
from sys import stdin

def main():
    N = int(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)

input = lambda: stdin.readline()
main()

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

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

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

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)]
print(sum([d for d in diff if d > 0]))

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

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

Solution (Python):
import numpy as np

N = int(input())
v = input().split()
c = input().split()
a = 0
for i in range(N):
    d = int(v[i])-int(c[i])
    if d>0:
        a += d


print(a)

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

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

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

prices = list(input().split())
costs = list(input().split())

benefit = 0
for price, cost in zip(prices, costs):
  if int(price) > int(cost):
    benefit += int(price) - int(cost)
    
print(benefit)

Solution (Python):
import sys,collections as cl
Max = sys.maxsize
def l():
	return list(map(int,input.split()))
def m():
	return map(int,input().split())
def s(x):
	a = []
	aa = x[i]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a

n = int(input())

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

print(su)

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

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

Solution (Python):
def main():
    input = sys.stdin.readline
    try:
        n = int(input())
        v = list(map(int, input().split()))
        c = list(map(int, input().split()))
        arr = [v[i] - c[i] for i in range(n) if v[i] - c[i] > 0]
        print(sum(arr))
        

    finally:
        input = None

import sys; sys.setrecursionlimit(50000)
if __name__ == "__main__":
    main()

Solution (Python):


import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main(N, Vn, Cn):
    XYmax = 0
    for i in range(N):
        xyi = Vn[i] - Cn[i]
        if xyi > 0:
            XYmax += xyi
    print(XYmax)

N = i2n()
Vn = i2nn()
Cn = i2nn()
main(N, Vn, Cn)

Solution (Python):
N = int(input())
V = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
P = [V[x]-C[x] for x in range(N)]

P = sorted(P)[::-1]
i,ans = 0,0

while P[i] > 0:
    ans += P[i]
    i += 1
    if i == N:
        break
print(ans)