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

print(ans)

Solution (Python):
num = input()
str = []
ans = 0
for i in range(2):
  str.append(input().split())

for i in range(int(num)):
  if int(str[0][i]) > int(str[1][i]):
    ans += int(str[0][i]) - int(str[1][i])

print(ans)

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

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

c = [int(s) for s in input().split()]

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

print(price)

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__':
    input_list = list(map(int, input().split()))
    N = input_list
    input_list = list(map(int, input().split()))
    V_list = input_list
    input_list = list(map(int, input().split()))
    C_list = input_list

    d_list = [v - c for (v, c) in zip(V_list, C_list)]

    answer = 0

    for d in d_list:
        if d > 0 :
            answer += d

    print(answer)

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

Solution (Python):
import numpy as np

num = int(input())
value_list = np.array(list(map(int, input().split())))
cost_list = np.array(list(map(int, input().split())))

diff = value_list - cost_list

max_value = 0

for d in diff:
    if d > 0:
        max_value += d

print(max_value)

Solution (Python):
def split_returner(chardata):
        chardata = str(chardata).split(" ")
        for i in range(0,len(chardata)):
            chardata[i] = int(chardata[i])
        return chardata

num = int(input())
value = split_returner(input())
cost = split_returner(input())

res = 0
gain = 0

for i in range(0,len(value)):
    gain = value[i] - cost[i]
    if gain >= 0:
        res += gain
    else:
        pass

print(res)

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

Ss = []
for i in range(N):
	Ss.append([Vs[i],Cs[i],Vs[i]-Cs[i]])
	
Ss = sorted(Ss,key=lambda x: x[2],reverse=True)

ans = 0
for s in Ss:
	if s[2] < 0:
		break
	
	ans += s[2]
	
print(ans)

Solution (Python):
n = int(input())
v_list = list(map(int,input().split()))
c_list = list(map(int,input().split()))
res = []
for i in range(n):
    if v_list[i]-c_list[i] > 0:
        res.append(v_list[i]-c_list[i])
    else:
        continue
print(sum(res))

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

Solution (Python):
argN = int(input())
argV = list(map(int,input().split()))
argC = list(map(int,input().split()))
ret = 0
for i in range(argN):
  if argV[i] > argC[i]:
    ret += argV[i] - argC[i]
print(ret)

Solution (Python):
n = int(input())
listV = list(map(int, input().split()))
listC = list(map(int, input().split()))
listA = []
b = 0
for i in range(n):
    a=listV[i]-listC[i]
    listA.append(a)

for j in range(n):
    if listA[j]>0:
        b = b + listA[j]
print(b)

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
        lines.append(input())

    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])
    v = [int(e) for e in lines[1].split(" ")]
    c = [int(e) for e in lines[2].split(" ")]

    return (n, v, c)


def solve(n, v, c):

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

    return result


def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

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

Solution (Python):
import numpy as np
n=int(input())
v=np.array([int(i) for i in input().split()])
c=np.array([int(i) for i in input().split()])

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

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

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

Solution (Python):
N = int(input())
list = [list(map(int,input().split())) for i in range(2)]
ans = 0

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

print(ans)

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

Solution (Python):
N=int(input())
a=input()
b=input()
V=[]
C=[]
A=a.split()
B=b.split()
for i in range(len(A)):
  V.append(int(A[i]))
  C.append(int(B[i]))


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

Solution (Python):



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

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

print(r)

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

for v, c in zip(V, C):
    B.append(v - c)

total_b = 0
for b in B:
    if b > 0:
        total_b += b

print(total_b)

Solution (Python):
n = int(input())
value = list(map(int, input().split()))
cost = list(map(int, input().split()))
ret = 0
for state in range((1 << n)):
    values = costs = 0
    for shift in range(n):
        if (state >> shift) & 1 == 1:
            values += value[shift]
            costs += cost[shift]
    ret = max(ret, values - costs)
print(ret)

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

def dfs(index, value, cost):
	if index == n:
		return value - cost 
	else:
		res0 = dfs(index + 1, value, cost)
		res1 = dfs(index + 1, value + v[index], cost + c[index])
		return max(res0, res1)

print(dfs(0,0,0))

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

print(b)

Solution (Python):
input()
v_list = map(int, input().split())
c_list = map(int, input().split())
result = 0
for v, c in zip(v_list, c_list):
    tmp = v - c
    if tmp > 0:
        result += tmp
print(result)

Solution (Python):

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

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

Solution (Python):

import sys


def solve(N: int, V: "List[int]", C: "List[int]"):
    ans = [V[i]-C[i] for i in range(len(V))]
    ans2 = [i for i in ans if i >= 0]

    print(sum(ans2))
    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):
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):
Sum = 0

N = int(input())

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

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

print(Sum)

Solution (Python):

def main():
    result = sub()
    print(result)


def sub():
    N = int(input())
    Vs = [int(i) for i in input().split()]
    Cs = [int(i) for i in input().split()]

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


if __name__ == '__main__':
    main()

Solution (Python):

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


print(sum(ans))

Solution (Python):
N = input()
Vs =  list(map(int, input().split()))
Cs =  list(map(int, input().split()))
Rs = []
for i, v in enumerate(Vs):
  Rs.append(v - Cs[i])
res = 0
for r in Rs:
  if r > 0:
    res += r
print(res)

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

p = 0

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

print(p)

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

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

sum = 0
for i in range(N):
    if V_list[i] >= C_list[i]:
        sum += V_list[i] - C_list[i]
    else:
        pass

print(sum)

Solution (Python):
N=int(input())
V=[int(i) for i in input().split()]
C=[int(i) for i in input().split()]
res=0
for vv,cc in zip(V,C):
  if vv-cc>0:
    res=res+vv-cc
print(res)

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

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

ans = 0
for i in benefit:
    if (i > 0):
        ans += i

print(ans)

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

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

ans = 0
for i in range(N):
    ans = max([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()))

value=0

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

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

print(ans)

Solution (Python):

"""
Created on Sat Apr 27 21:06:24 2019

@author: yuta
"""

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

def main(n,v,c):
    value = [0]*n
    for i in range(n):
        value[i] = v[i] - c[i]
    
    count = 0
    for j in range(n):
        if value[j] > 0:
            count += value[j]
    print(count)
main(N,V,C)

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

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

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

print(int(sum([v[i] - c[i] for i in range(n) if v[i] > c[i]])))

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

good = []
max_c = 0

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

print(max_c)

Solution (Python):
import sys
 
 
N = int(sys.stdin.readline())
V = sys.stdin.readline().strip().split()
C = sys.stdin.readline().strip().split()


dif = []
for i in range(N):
    V_i = int(V[i])
    C_i = int(C[i])
    dif.append(V_i-C_i)
    
sum = 0
for s in dif:
    if(s>0):
        sum += s
print(sum)

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

print(sum([v-c for v, c in zip(Vs, Cs) if v-c>=0]))

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

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

p = 0
m = 0

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

Solution (Python):
N = int(input())
V = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]
 
N = []
for i, v in enumerate(V):
    N.append(V[i]-C[i])

N.sort(reverse=True)
 
result = 0
for n in N:
    if 0<n:
        result += n
    else:
        break

print(result)

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

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

print(num)

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

ans=0
for i in range(len(A)):
    if A[i]>0:
        ans+=A[i]
print(ans)

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

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

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

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

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

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

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

print(T_max)

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

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

print(diff)

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

ans = 0

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

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
s=sorted([a-b for a,b in zip(v,c)])[::-1]
d=[sum(s[:i])for i in range(len(s)+1)]
print(max(max(d),0))

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

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

print(count)

Solution (Python):
import numpy as np
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
s = np.array(v) - np.array(c)
print(s[s > 0].sum())

Solution (Python):
read_ints = lambda : map(int, raw_input().strip().split())

n = input()
v = read_ints()
c = read_ints()

ans = sum(v) - sum(c)

for i in xrange(1 << n):
    cur = 0
    for j in xrange(n):
        if (i & (1 << j)):
            cur += v[j]
            cur -= c[j]
    ans = max(ans, cur)

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 = int(input())
Vlist = np.array(list(map(int, input().split())))
Clist = np.array(list(map(int, input().split())))
diff_list = []

sum = 0
for i in range(0, N):
    diff = Vlist[i] - Clist[i]
    if diff > 0:
        sum = sum + diff

print(sum)

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


print(int(ans))

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
xy =[]
ans = 0

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

for i in xy:
  if i > 0:
    ans += i

print(ans)

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

cost =[i-j for i,j in zip(V,C)]

profit = 0

for i in cost:
    if(i>=0):
        profit+=i

print(profit)

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

Solution (Python):
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):
N = int(input())
V = input().split()
C = input().split()

ans = 0

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

print(ans)

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

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

print(r)

Solution (Python):
N = int(input())
V_LIST = list(map(int, input().split()))
C_LIST = list(map(int, input().split()))

ans = 0
for a in range(N):
    b = V_LIST[a] - C_LIST[a]
    if b > 0:
        ans += b

print(ans)

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

t = [ x-y for (x, y) in zip(v, c) ]

ans = 0

for i in t:
    if i > 0:
        ans += i

print(ans)

Solution (Python):




N = int(input())
V = input().split()
C = input().split()

t_v = 0
t_c = 0

for i in range(N):
    v = int(V[i])
    c = int(C[i])

    if v - c > 0:
        t_v += v
        t_c += c
    elif c - v < 0:
        t_v += v

print(t_v - t_c)

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

ans = 0

for a, b in zip(g, c):
	if a > b:
		ans += (a - b)

print(ans)

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

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

xy = 0

for v, c in zip(V, C):
    if c < v:
        xy += v - c

print(xy)

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

Solution (Python):
import sys


def parse(file):
    n = int(file.readline())
    vs = map(int, file.readline().split())
    cs = map(int, file.readline().split())
    return n, vs, cs


def main(n, vs, cs):
    ans = 0
    for v, c in zip(vs, cs):
        if v - c > 0:
            ans += v - c
    return ans


if __name__ == '__main__':
    print(main(*parse(sys.stdin)))

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

bene = []

for i in range(N):
    if vals[i] - costs[i] > 0:
        bene.append(vals[i]-costs[i])

print(sum(bene))

Solution (Python):

n = int(input())
v_l = list(map(int, input().split()))
c_l = list(map(int, input().split()))

sa = []
sum = 0
for i in range(n):
    xy = v_l[i]-c_l[i]
    if xy >0:
        sum = sum+xy

print(sum)

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

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

diff = []
for i in range(N):
    diff.append(Vs[i]-Cs[i])
ans = 0
for i in range(N):
    if diff[i] > 0:
        ans += diff[i]
    else:
        pass
print(ans)

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

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

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

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

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

Solution (Python):
from sys import stdin
from collections import deque, defaultdict as ddic
from itertools import combinations, permutations, product
import bisect
import heapq


rs = lambda: stdin.readline().strip()
ri = lambda: int(rs())
rsl = lambda: stdin.readline().split()
rim = lambda: map(int, rsl())
ril = lambda: list(rim())

N = ri()
values = list(rim())
costs = list(rim())
maximum = 0
for i in range(len(values)):
    psum = values[i] - costs[i]
    if psum > 0:
        maximum += psum

print(maximum)

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

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

Solution (Python):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
max = 0
for i in range(n):
    if v[i] > c[i]:
        max += v[i] - c[i]
print(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 = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]

diff = []

for v, c in zip(V, C):
    if v-c < 0:
        continue
    diff.append(v-c)

print(sum(diff))

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

a = [v[i]-c[i] for i in range(n)]
b = []
for i in range(n):
    if a[i]>0:
        b.append(a[i])
if b==[]:
    print(0)
else:
    print(sum(b))

Solution (Python):
N = int(input())
V = [int(v) for v in input().split()]
C = [int(c) for c 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):
def input_from_console():
    n = int(input())

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


def main():
    n, v, c = input_from_console()
    
    diff_list = sorted([v[i] - c[i] for i in range(len(v)) if v[i] - c[i] > 0], reverse=True)
    
    print(sum([diff_list[i] for i in range(len(diff_list))]))

if __name__ == "__main__":
    main()

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

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):
def solve(N, V, C):
    val = 0
    for i in range(N):
        if V[i] - C[i] > 0:
            val += V[i] - C[i]
    return val

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


print(solve(N, V, C))

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):
N = int(input())
V_list = input().split()
C_list = input().split()
dif_list = []
maxim = 0

for i in range(N):
    dif_list.append(int(V_list[i]) - int(C_list[i]))

dif_list.sort(reverse=True)

for i in range(N):
    if dif_list[i]>0:
        maxim += dif_list[i]
    else:
        break;
        
print(maxim)

Solution (Python):
import numpy as np

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

V = np.array(v)
C = np.array(c)

X = V - C
T = 0

for i in range(N):
	if X[i] > 0:
		T += X[i]
	else:
		pass

print(T)

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

Solution (Python):
num=input()
price=list(map(int,input().split()))
cost=list(map(int,input().split()))
list=[x-y for x,y in zip(price,cost) if x>y ]+[0]
print(sum(list))

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

for i,j in zip(v,c):
    v = i - j
    if v > 0:
        goukei += v

print(goukei)

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

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(int(V[i]-C[i]))
listo = [j for j in x if j > 0]
print(sum(listo))

Solution (Python):
n=int(input())
v=map(int,input().split())
c=map(int,input().split())
ans=0
for i,j in zip(v,c):
    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()))
rv=[v[i]-c[i] if v[i]-c[i]>=0 else 0 for i in range(n)]
ans=0
for j in range(n):
    ans+=rv[j]
print(ans)

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


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

ans = 0
for i in range(A):
    if C[i] < V[i]:
        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):
  p = int(V[i])-int(C[i])
  if p>0:
    ans +=p
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 v,c in zip(V,C):
  x = v-c
  if x > 0:
    ans += x
    
print(ans)

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

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

Solution (Python):
N = int(input())
list_V = [int(i) for i in input().split()]
list_C = [int(i) for i in input().split()]
total = 0

for i in range(N):
    income = list_V[i] - list_C[i]
    if income > 0:
        total += income

print(total)

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
value = list(map(int, input().split(' ')))
cost = list(map(int, input().split(' ')))

result = 0

for x, y in zip(value,cost):
    if x-y > 0:
        result += x-y
        
print(result)

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

sum=0
for value,cost in zip(A,B):
  if value>cost:
    sum +=value-cost
  else:
    pass
print(sum)

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
diff = []
for i in range(N):
    diff.append(V[i]-C[i])
sum = 0
for i in range(N):
    if diff[i] > 0:
        sum += diff[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):
    wa=V[i]-C[i]
    if wa > 0:
        ans+=wa
print(ans)

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

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

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


print(ans)