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

val_list = [V_list[i] - C_list[i] for i in range(N)]



ans = 0
for val in val_list:
    if val > 0:
        ans += val

print(ans)

Solution (Python):
"""


 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  


a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654


char_list = list("abcd") 
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    n = int(sys.stdin.readline())
    v = list(map(int, sys.stdin.readline().split()))
    c = list(map(int, sys.stdin.readline().split()))
    ans = 0
    for i in range(len(v)):
        n = v[i]-c[i]
        if n >0:
            ans += n
    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())
listv=[int(x) for x in input().split()]
listc=[int(y) for y in input().split()]
values=[x - y for (x, y) in zip(listv, listc)]
ans = 0
for i in values:
  if i>0:
    ans+=i
print(ans)

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

u = []
for i in range(0,n):
    u.append(max(v[i]-c[i],0))
print(sum(u))

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

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

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

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

Solution (Python):
N = input()
X = list(map(int,input().split()))
Y = list(map(int,input().split()))
Z = []
for i in range(len(X)):
  if X[i]>Y[i]:
    a = X[i]-Y[i]
    Z.append(a)
print(sum(Z))

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

out = 0

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

print(out)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


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


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


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

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

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

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

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

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

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

print(sum)

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.sort(reverse=True)

ans = 0
for v in vc:
    if v < 0:
        break
    ans += v
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] > 0:
        ans += a[i]-b[i]

print(ans)

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

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

print(ans)

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

import re




def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e18)
MOD = int(1e9)+7 



N = i_inpl()
V = l_inpl()
C = l_inpl()

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

ans = 0
print(sum([ li for li in l if li > 0]))

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

print(value)

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

lsV = list(map(int,input().split()))
lsC = list(map(int,input().split()))

ans = 0

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

print(ans)

Solution (Python):
import numpy as np
n = int(input())
v = np.array(list(map(int,input().split())))
c = np.array(list(map(int,input().split())))

profit = v - c

max_profit = np.sum(profit[profit>0])
print(max_profit)

Solution (Python):
n = input()

v_li = list(map(int, input().split()))
c_li = list(map(int, input().split()))
maximam = 0
vc_li = [i- j for i, j in zip(v_li , c_li)]
vc_li.sort(reverse = True)
ans = 0
for i in vc_li:
    if i <= 0:
        break
    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=ans+V[i]-C[i]
print(ans)

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

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

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

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):
    differences = v[i] - c[i]
    if 0 < differences:
        ans += differences
    else:
        continue
print(ans)

Solution (Python):
n = int(input())
v = list(map(int, input().split(" ")))
c = list(map(int, input().split(" ")))
ans = sum(a - b for a,b in zip(v, c) if a > b)
print(ans)

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

sum = 0
for i in range(0,n):
  sum += vn[i] - cn[i] if vn[i] - cn[i] > 0 else 0

print(sum)

Solution (Python):
def resolve():
    n = int(input())
    v = map(int,input().split())
    c = map(int,input().split())
    s = [x-y for x,y in zip(v,c) if (x-y)>0]
    ans = 0
    if s:
        ans = sum(s)
    print(ans)

if __name__ == "__main__":
    resolve()

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
Y = [False]*(len(V))
for i in  range(len(V)):
    if X[i] >=0:
        Y[i]=True
    else:
        Y[i]=False

Xnatural = X[np.array(Y)]
print(np.sum(Xnatural))

Solution (Python):
import sys
import math
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [N] = string_to_int(inputs[0])
    V = string_to_int(inputs[1])
    C = string_to_int(inputs[2])

    ret = 0
    for i, _ in enumerate(V):
        if V[i] - C[i] > 0:
            ret += V[i] - C[i]
    return ret


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(3))
    print(ret)

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

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

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

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

sum = 0

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

print(sum)

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

    print(sum([x - y for x, y in zip(V, C) if x > y]))


if __name__ == '__main__':
    main()

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

integer = int(0)
v = input().split()

c = input().split()

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

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

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

print(ans)

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

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

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

for i in range(N):
  if V[i]-C[i]>0:
    Z.append(V[i]-C[i])

print(sum(Z))

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

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

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

M = [[V[i], C[i]]for i in range(N)]



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

print(R)

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

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

print(ans)

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

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

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

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

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
S = 0
for i in range(0, N):
    if V[i] > C[i]:
        S += V[i] - C[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())
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
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  



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

def main():
    N = i2n()
    V = i2nn()
    C = i2nn()
    n = 0
    for v, c in zip(V, C):
        xy = v - c
        if xy > 0:
            n += xy
    print(n)

main()

Solution (Python):
N = int(input())
values = list(map(int,input().split()))
costs = list(map(int,input().split()))
dictionary = []
for v in range(N):
  dictionary.append([values[v],costs[v]])
x,y=0,0
result = []
for i in range(N):
  if dictionary[i][0] - dictionary[i][1]>0:
    result.append(dictionary[i][0]-dictionary[i][1])
print(sum(result))

Solution (Python):
n=int(input())
listv=[int(x) for x in input().split()]
listc=[int(y) for y in input().split()]
values=[x - y for (x, y) in zip(listv, listc)]
ans = 0
for i in values:
  if i>0:
    ans+=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()))

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

Solution (Python):


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

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

print(ans)

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

dif = [value[x] - cost[x] for x in range(n)]

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

print(cnt)

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

Solution (Python):
n = int(input())
v_ary = list(map(int, input().split()))
c_ary = list(map(int, input().split()))

a_minus_b = 0

for i in range(n):
    if v_ary[i] - c_ary[i] > 0:
        a_minus_b += v_ary[i] - c_ary[i]
print(a_minus_b)

Solution (Python):
def main():
    N = int(input())
    *V, = map(int, input().split())
    *C, = map(int, input().split())
    value = sum([v - c for v, c in zip(V, C) if v > c])
    print(value)


main()

Solution (Python):
N=int(input())
R=input().split()
C=input().split()
P=0

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

print(P)

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


R=input().split()
C=input().split()
P=0

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

print(P)

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

value = [int(x) for x in input().split()]
cost = [int(x) for x in input().split()]

print(sum([int(value[i] - cost[i]) for i in range(n) if value[i] > cost[i]]))

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

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

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

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 = 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):
a = int(input())
b = []
b.append(list(map(int, input().split())))
b.append(list(map(int, input().split())))
c = 0
for i in range(a):
    if b[0][i] > b[1][i]:
        c += b[0][i] - b[1][i]
print(c)

Solution (Python):
N = int(input())
V = [int(x) for x in input().split()]
C = [int(x) for x in 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(' ')))

benefit = []
for i in range(N):
  b = V[i]-C[i]
  benefit.append(max(0,b))
  
print(sum(benefit))

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

sum = 0

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

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

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

ma = 0

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

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

result=0

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

print(result)

Solution (Python):


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

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

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

print(sum(map(lambda p: max(0, p[0] - p[1]), zip(V, C))))

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

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

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

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

ans = 0
for i in range(n):
  if vs[i]-cs[i] > 0:
    ans += vs[i]-cs[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()))

b = sorted([v[i]-c[i] for i in range(n)],reverse=True)
ans = 0
for i in range(len(b)):
    if b[i] > 0:
        ans += b[i]
    else:
        break
print(ans)

Solution (Python):
n = input()
n = int(n)
l1=[]
l2=[]
l1 = input().split(" ")
l2 = input().split(" ")
total=0;
for i in range(0,n):
	v1=int(l1[i])
	v2=int(l2[i])
	if(v1-v2>0):
		total = total+v1-v2
print(total)

Solution (Python):
juwel_num = int(input())
juwel_value = list(map(int, input().split()))
juwel_cost = list(map(int, input().split()))

total_value = 0

for i in range(juwel_num):
    value_score = juwel_value[i] - juwel_cost[i]
    if value_score > 0:
        total_value += value_score

print(total_value)

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

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

sum = 0

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

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

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

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
diffs=[vv-cc for vv,cc in zip(v,c)]

ans=0
for d in diffs:
    ans+=max(d,0)

print(ans)

Solution (Python):
n = input()
val_list = list(map(int,input().split()))
cost_list = list(map(int,input().split()))

sum_value = 0

for i in range(int(n)):
	a = val_list[i] -cost_list[i]
	if a>0:
		sum_value += a

print(sum_value)

Solution (Python):

from collections import defaultdict
import math
import re

def main():
    
    N = int(input())
    V_list = [int(v) for v in input().split()]
    C_list = [int(v) for v in input().split()]

    VC_diffs = [v - c for v, c in zip(V_list, C_list)]
    VC_diffs = [vc for vc in VC_diffs if vc > 0]

    if VC_diffs:
        print(sum(VC_diffs))
    else:
        print(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 n in range(N):
	a = V[n] - C[n]
	if a > 0:
		ans += a
print(ans)

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

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

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

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

Solution (Python):
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 = [0] * N
C = [0] * N
V = list(map(int, input().split()))
C = list(map(int, input().split()))

benefit = 0

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

print(benefit)

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

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

Solution (Python):

import numpy as np
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
Z = np.array(V) - np.array(C)
point = sum(Z[Z>=0])
print(point)

Solution (Python):
n = int(input())
lstv = list(map(int,input().split()))
lstc = list(map(int,input().split()))
ans = 0
for i in range(n):
    vc = lstv.pop(0)-lstc.pop(0)
    if vc >=0: ans+=vc
print(ans)

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

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

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

import numpy as np

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

benefit = V - C
sum_b = 0
for item in benefit:
    if item > 0:
        sum_b += item

print(sum_b)

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

plslst = [x - y for (x, y) in zip(v, c)]
ans = []
for i in plslst:
    if i > 0:
        ans.append(i)
    else:
        pass
print(sum(ans))

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

inf_min = -float("inf")
dp = [inf_min] * (n +1)
dp[0] = 0
for i in range(n):
  dp[i+1] = max(v[i] - c[i] +dp[i] , dp[i])
print(dp[n])

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):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


if __name__ == '__main__':
    main()

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

Solution (Python):
s=list(map(int,input().split()))
t=list(map(int,input().split()))
u=list(map(int,input().split()))
vw=[]
for i in range(s[0]):
  if t[i]-u[i]>0:
    vw.append(t[i]-u[i])
print(sum(vw))

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):
n = int(input())
vl = list(map(int, input().split()))
cl = list(map(int, input().split()))
ans = 0
for i in range(n):
  dif = vl[i] - cl[i]
  if dif > 0:
    ans += dif
print(ans)

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

for i in range(N):
	if V[i] > C[i]:
		lst.append(V[i] - C[i])

print(sum(lst))

Solution (Python):
n = int(input())
vc = [[int(i) for i in input().split()] for i in range(2)] 
xy = []
for i in range(n):
    xy.append(vc[0][i]-vc[1][i])
ans = 0
for i in range(n):
    if 0 < xy[i]:
        ans += xy[i]
print(ans)

Solution (Python):
def abc():
    input()
    v = map(int, input().rstrip().split())
    c = map(int, input().rstrip().split())
    net = sum([x - y for x, y in zip(v, c) if x - y > 0])
    print(net)


abc()

Solution (Python):
N = int(input())
Vanswer = 0
Canswer = 0
V = input().split()
V = [int(x) for x in V]
C = input().split()
C = [int(x) for x in C]

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

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

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



print(sum)

Solution (Python):
import numpy as np
n=int(input())
values=[int(i)  for  i  in  input().split()]
costs=[int(i)  for  i  in  input().split()]
score=0
benefits=np.sort([values[i]-costs[i]  for  i  in  range(n)])[::-1]
for  i  in  range(n):
    if  benefits[i]>0:
        score+=benefits[i]
    else:
        break

print(score)

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

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

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

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

sum_li = v-c
print(sum(sum_li[sum_li > 0]))

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

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

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]
    else:
        sum += 0
print(sum)

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

cost = []

for i in range(N):
  X = V[i] - C[i]
  if X >= 0:
    cost.append(X)

print(sum(cost))