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=[i for i in map(int,input().split())]
C=[i for i in 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):
if __name__ == '__main__':
    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(map(int, input().split()))
c = list(map(int, input().split()))

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

print(m)

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

print(ans)

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

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

Solution (Python):
import math

n = int(input())
v_list = [int(i) for i in input().split()] 
c_list = [int(i) for i in input().split()] 

i = 0
sum = 0

while i < n:
  diff = v_list[i] - c_list[i]
  if diff > 0:
    sum += diff
  i+=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 C[i] < V[i]:
        ans += V[i] - C[i]
print(ans)

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

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

print(ans)

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

Solution (Python):

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

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

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

diff = [V[i] - C[i] for i in range(N)]
s = sum([i for i in diff if i >= 0])
print(s)

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

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

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

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

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

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

X_Y = 0

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

print '{}'.format(X_Y)

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

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

Solution (Python):




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

psum = 0

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


print(psum)

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


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

vc.sort(reverse=True)
t=0
for i in range(len(vc)):
    if vc[i] > 0:
        t += vc[i]
print(t)

Solution (Python):

import sys
import math
import numpy as np
import itertools



n = int(input())

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

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

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

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

sum=0
for v_v,c_c in zip(v,c):
    if v_v-c_c>0:
        sum+=v_v-c_c
print(sum)

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):
n = int(input())

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

def dfs(s, i=n - 1):
    if i < 0:
        return s
    return max(dfs(s + v[i] - c[i], i - 1), dfs(s, i - 1))

print(dfs(0))

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

VC = zip(V, C)
summ = 0
for vc in VC:
    a = vc[0] - vc[1]
    if a > 0:
        summ += a
print(summ)

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

m = 0

for V,C in zip(Vs,Cs):
	if(V > C):
		m = m + V - C
	else:
		pass

print(m)

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

import numpy as np

ans = np.array(v) - np.array(c)

print(sum(ans[ans >= 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):



def main():
    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]:
            result += v[i]
            result -= c[i]
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):


import numpy as np
import math
import re

n = int(input())

x = input()
y = input()
x = re.split(" ",x)
y = re.split(" ",y)
sum = 0
for i in range(n):
    if(( int(x[i]) - int(y[i]) )> 0):
        sum +=  int(x[i]) - int(y[i])
print(sum)

Solution (Python):
n=int(input())
values = [ int(s) for s in input().split(" ") ]
costs = [ int(s) for s in input().split(" ") ]

ans=0
for i in range(n):
    if values[i] > costs[i]:
        ans += values[i] - costs[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())
Vlist = list(map(int,input().split()))
Clist = list(map(int,input().split()))
pro = [ v-c if v-c >=0 else 0 for v,c in zip(Vlist, Clist)]
print(sum(pro))

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):
  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()))
value = [v - c for (v, c) in zip(V, C)]
value.append(0)
value.sort(reverse=True)
print(sum(value[:value.index(0)]))

Solution (Python):
N = int(input())
Str_V = input()
Str_C = input()
V = [0]*N
C = [0]*N
V = Str_V.split(" ")
C = Str_C.split(" ")
ans = 0

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

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

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

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]
    else:
        pass
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):
    if v[i] - c[i] >= 0:
        x.append(v[i]-c[i])
print(sum(x))

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

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

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

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

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

ans = 0
for i in range(len(v)):
  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())

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

value = 0

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

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

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

count = 0
for i in range(n):
    count += max(a[i] - b[i], 0)
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] > 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] > 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()))

diff = [0]*n

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

print(sum(diff))

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(len(V_list)):
    if V_list[i] > C_list[i]:
        ans += V_list[i] - C_list[i]
        
print(ans)

Solution (Python):
def main():
    N = int(input())
    Values = list(map(int, input().split()))
    Costs = list(map(int, input().split()))

    print(sum(value - cost for value, cost in zip(Values, Costs) if value > cost))

if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np
_ = input()
price = np.array([int(x) for x in input().split(" ")])
cost = np.array([int(x) for x in input().split(" ")])

money = price - cost

print((money * (money > 0)).sum())

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

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

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

print(ans)

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 i in range(N):
    if X[i] > 0:
        ans += X[i]
print(ans)

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

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

worth = [V[i] - C[i] for i in range(N)]
print(sum([i for i in worth if i > 0]))

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

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

print(ans)

Solution (Python):
import sys

input = sys.stdin.readline
n = int(input())
v_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
ans = 0
for i in range(n):
    dis = v_list[i] - c_list[i]
    if dis > 0:
        ans += dis
print(ans)

Solution (Python):
N=int(input())
Vs=[int(i) for i in input().split()]
Cs=[int(i) for i in input().split()]
score=0
for i in range(N):
    score += 0 if Vs[i]-Cs[i] <0 else Vs[i]-Cs[i]

print(score)

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

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

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

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

print val

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

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

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

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

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
RV = [0] * N
for i in range(N):
    RV[i] = V[i] - C[i]
RV.sort(reverse=True)
res = 0
for v in RV:
    if v <= 0:
        break
    res += v
print(res)

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

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

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

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

print(A)

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

Solution (Python):

import sys


def solve(N: int, V: "List[int]", C: "List[int]"):
    result = 0
    for i in range(0, N):
        if V[i] >= C[i]:
            result = result + V[i] - C[i]
    print(result)
    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()))
ans = sum([max(0, V[i]-C[i]) for i in range(N)])
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]:
		total += v[i]-c[i]

print(total)

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

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

Solution (Python):


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

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

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

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = [a[i]-b[i] for i in range(n)]
ans = 0
for i in range(n):
     ans += max(0,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()]
p = [V[i] - C[i] for i in range(N)]
p.sort(reverse=True)

res = 0
for i in p:
        if i <= 0:
                break
        res += i
print(res)

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

vsum = 0
for c, v in zip(Cs, Vs):
  net = v - c
  if net > 0:
    vsum += net

print(vsum)

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,j in zip(v,c):
  if i-j>0:
    ans+=i-j
    
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()]
result = 0
for i in range(N):
	if v_list[i]>c_list[i]:
		result+=v_list[i]-c_list[i]
print(result)

Solution (Python):
a = input()

l1 = map(int, raw_input().split())
l2 = map(int, raw_input().split())

s = 0
for i in range(a):
	if l1[i] > l2[i]:
		s += l1[i] - l2[i]

print s

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

Solution (Python):
n = int(input())
vs = [int(i) for i in input().split()]
cs = [int(i) for i in input().split()]
tmp = [v - c for v, c in zip(vs, cs)]
print(sum(t for t in tmp if t > 0))

Solution (Python):
N = int(input())
Vlist = list(map(int, input().split()))
Clist = list(map(int, input().split()))

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

print(value)

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

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

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

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

print(result)

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

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

print(ans)

Solution (Python):
n = int(input())
vn = [int(i) for i in input().split(" ")]
cn = [int(i) for i in input().split(" ")]
res = 0
for i in range(n):
    tmp = vn[i] - cn[i]
    if tmp > 0:
        res += tmp

print(res)

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

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

print(total)

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

value = 0
for i, j in zip(V, C):
    tmp = i - j
    if tmp > 0:
        value += tmp

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.append(V[i]-C[i])
ans = sum(Ans)
print(ans)

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

ans = 0
for vi,ci in zip(v,c):
    ans = ans + max(0, vi-ci)

print(ans)

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

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

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

print(t)

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

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

print(ans)

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

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

x = []
for vv, cc in zip(v, c):
    a = vv - cc
    if a > 0:
        x.append(a)
print(sum(x))

Solution (Python):
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
V = IL()
C = IL()

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

ans = 0

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


print(ans)

Solution (Python):

import sys


def solve(N: int, V: "List[int]", C: "List[int]"):
    total = 0
    for i in range(N):
        if V[i] > C[i]:
            total += V[i] - C[i]
    print(total)
    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()))
D = [V[k] - C[k] for k in range(N)]

D = sorted(D)[::-1]

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

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

print(sum(T))

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

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

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

total = 0

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

print(total)

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

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

ans = 0
for e, f in zip(v, c):
    p = e - f
    if p > 0:
        ans += p
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] > 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()))

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 = [int(elm) for elm in input().split(" ")] 
C = [int(elm) for elm in input().split(" ")] 

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

print(out)

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

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

print(ans)

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

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

print(ans)

Solution (Python):
N = int(input())
v_list = [int(x) for x in input().split()]
c_list = [int(x) for x in input().split()]

result = 0
for v, c in zip(v_list, c_list):
    profit = v-c
    if v-c>0:
        result += profit
        
print(result)

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


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

main()

Solution (Python):
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 = list(map(int,input().split()))
C = list(map(int,input().split()))
s = []
for i in range(n):
    s.append(V[i]-C[i])
s.sort(reverse=True)
res = 0
for a in s:
    if a >= 0:
        res += a
print(res)