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):
import sys
sys.setrecursionlimit(10**9)
INF = 10**18


def input():
    return sys.stdin.readline().rstrip()


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


if __name__ == '__main__':
    main()

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

V = [int(v) for v in V]
C = [int(c) for c in C]

def dp(i):
    if(i==0):
        if(V[i]<C[i]):
            return 0,0 
        else:
            return V[i],C[i]
    
    else:
        v,c = dp(i-1)
        v1 = v + V[i]
        c1 = c + C[i]
        
        if(v1-c1 <= v-c):
            return v,c
        else:
            return v1,c1
        
        
v,c = dp(N-1)
print(v-c)

Solution (Python):
N = list(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()))

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

print(ans)

Solution (Python):

import sys










def main():
    n = int(sys.stdin.readline().rstrip())
    v = [int(x) for x in sys.stdin.readline().split()]
    c = [int(x) for x in sys.stdin.readline().split()]

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



if __name__ == "__main__":
    main()

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

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

print(profit)

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

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

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

vl = list(map(int,input().split()))
cl = list(map(int,input().split()))

ans = 0

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

Solution (Python):
n = int(input())
v = map(int, input().split())
c = map(int, input().split())
answer = sum(vi - ci for vi, ci in zip(v, c) if vi - ci > 0)
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 = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]

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

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
ans = []
for i in range(N):
  ans.append(V[i] - C[i])
 
ans.sort()
for i in range(N):
  if ans[i] < 0:
        ans[i] = 0
  else:
    break
print(sum(ans))

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

ans.sort()
for i in range(n):
  if ans[i] < 0:
        ans[i] = 0
  else:
    break
print(sum(ans))

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

for i in range(N):
  t = a[i]-b[i]
  if t >= 0:
    count += t
print(count)

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

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())))
val = V-C
sum = 0
VV = val[val>0]
print(np.sum(VV))

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

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):
    sa = v[i] - c[i]
    if sa > 0:
        ans += sa
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 = [int(x) for x in input().split()]
c = [int(x) for x in 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())
vs = list(map(int, input().split()))
cs = list(map(int, input().split()))
ans = 0
for i in range(len(vs)):
  if vs[i] >= cs[i]:
    ans += (vs[i]-cs[i])
print(ans)

Solution (Python):
n = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
cnt = 0
ls = []

for i in range(n):
    ls.append(V[i] - C[i])

for l in ls:
    if l >= 0:
        cnt += l

print(cnt)

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

print(ans)

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

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

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

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

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

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

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

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

Solution (Python):


n = int(input())
v_list = input().split()
c_list = input().split()
sum = 0
for i in range(0,n):
    v = int(v_list[i])
    c = int(c_list[i])
    if v - c > 0:
        sum += v - c
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):
    y = ans + (V[i] - C[i])
    if ans < y:
        ans = y

print(ans)

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

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

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

print(res)

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

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

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

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()))
ans = 0

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

print(ans)

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


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):
  try:
      han = int(V[i]) - int(C[i])
      if han > 0:
        ans += han
  except TypeError:
    pass
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())))

sub = v - c
sub = np.where(sub >= 0, sub, 0)
print(sub.sum())

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
cnt = 0
""""
xy_l = []
for i in range(1 << N):
    xy = 0
    for j in range(N):
        if (i >> j) & 1:
            xy += V[j] - C[j]
            print(xy)
    xy_l.append(xy)
print(max(xy_l))
"""

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

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

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

print(a-b)

Solution (Python):
import sys

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

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]:
        Z.append(V[i] - C[i])
print(str(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])
  else:
    continue
print(ans)

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

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

print(get)

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

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

s = 0

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

print(s)

Solution (Python):


def main():
    N=int(input())
    Values =  [int(s) for s in input().split()]
    Costs =  [int(s) for s in input().split()]
    result = 0
    for i in range(N):
        value = Values[i]
        cost = Costs[i]
        if value > cost:
            result += (value - cost)
    print(result)

if __name__ == "__main__":
    main()

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())
v=input()
d=input()
v=v.split()
d=d.split()
for i in range(n):
    v[i]=int(v[i])
    d[i]=int(d[i])
ans=0
for j in range(n):
   if v[j]-d[j]>0:
     ans=ans+v[j]-d[j]
print(ans)

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

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

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

print(int(ans))

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

ma = 0
for i in range(2**n):
	a = bin(i)
	if len(a) < n+2:
		b = "0" * (n+2-len(a))
		a = a[:2] + b + a[2:]
	get = 0
	pay = 0
	for j in range(n):
		if a[j+2] == '1':
			get += v[j]
			pay += c[j]
	if ma < (get - pay):
		ma = (get - pay)

print(ma)

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

XY = 0

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

print(XY)

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

Solution (Python):
N = int(input())
Value = [[0 for i in range(N)] for j in range(2)]
Value = input().split()
Cost = input().split()
v = []
c = []
ac = 0
av = 0
best = []
wra = []
for i in range(N):
    v.append(int(Value[i]))
    c.append(int(Cost[i]))
    pass

for i in range(N):
    if c[i] < v[i]:
        best.append(v[i])
        wra.append(c[i])
print(sum(best) - sum(wra))

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

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

Solution (Python):






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





answer = 0

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

Solution (Python):
n = int(input())
v_L = list(map(int,input().split()))
c_L = list(map(int,input().split()))


ans = 0
for val in range(len(v_L)):
    if v_L[val] - c_L[val] >= 0:
        ans += v_L[val] - c_L[val]

print(ans)

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

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

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

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())
v = list(map(int,stdin.readline().rstrip().split()))
c = list(map(int,stdin.readline().rstrip().split()))
li = []
for i in range(n):
    if v[i] -c[i] > 0:
        li.append(v[i]-c[i])
li.sort()
print(sum(li))

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 x,y in zip(v,c):
    if x-y>0:
        ans+=x-y
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):
N=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=0
for i in range(N):
    if v[i]-c[i] >= 0:
        ans+=v[i]-c[i]

print(ans)

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

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

def z(n):
    return V[n]-C[n]

for i in range(N):
    if z(i)>0:
        Z.append(z(i))

ans=sum(Z)
print(ans)

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

lista=[]

for i in range(n):
	a=listv[i]-listc[i]
	if a<0:
		a=0
	lista.append(a)
	
print(sum(lista))

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

D = [V[n] - C[n] for n in range(N)]
D = [d for d in D if d > 0]

print(sum(D))

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

Solution (Python):
num = int(input())
value = [int(s) for s in input().split()]
cost = list(map(int, input().split()))

sum = 0
for i in range(num):
  if (value[i] - cost[i] > 0):
    sum += value[i] - cost[i]
print(sum)

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

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

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

print(xy)

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

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

print(X-Y)

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

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

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

i = 0
a = 0

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

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

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

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

print(ans)

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

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

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

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=[i-j for i,j in zip(v,c)]
print(sum([i for i in x if i>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())
V=[int(i) for i in input().split()]
C=[int(i) for i in input().split()]
n=0
for j in range(N):
   k=V[j]-C[j]
   if k>0:
      n+=k
print(n)

Solution (Python):
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 > 0]))

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    v = list(map(int, input().rstrip('\n').split()))
    c = list(map(int, input().rstrip('\n').split()))
    t = 0
    for i in range(n):
        if v[i] - c[i] > 0:
            t += (v[i] - c[i])
    print(t)


if __name__ == '__main__':
    slove()

Solution (Python):
import sys
import numpy as np
N = int(input())
V = np.array([int(v) for v in sys.stdin.readline().split()])
C = np.array([int(v) for v in sys.stdin.readline().split()])

diff = V - C
a = diff[diff > 0]

print(np.sum(a))

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

counter = 0
for a, b in zip(v, c):
    if a > b:
        counter += a - b
print(counter)

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(_) for _ in input().split()]
c = [int(_) for _ in input().split()]
s =[]
for i in range(n):
  a = v[i] -c[i]
  if a >0:
    s.append(a)
print(sum(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):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
ls1=[int(s) for s in input().split()]
ls2=[int(s) for s in input().split()]
x=0
for i in range(n):
  x+=max([ls1[i]-ls2[i],0])
print(x)

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

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

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



if __name__ == '__main__':
    main()

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

Solution (Python):
n = int(input())
L1 = list(map(int,input().split()))
L2 = list(map(int,input().split()))

ac = 0 
for i in range(n):
      if L1[i] > L2[i]:
            ac += L1[i] - L2[i]

print(ac)

Solution (Python):


n = input()

v = map(int, raw_input().split())
c = map(int, raw_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_li = list(map(int,input().split()))
c_li = list(map(int,input().split()))
ben = []
for i in range(n):
  b = v_li[i]-c_li[i]
  ben.append(b)
ben.sort()
ben.reverse()
ans = 0
for i in range(n):
  if ben[i] >0:
    ans+=ben[i]
  else:
    break
print(ans)

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

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

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

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

benefit = []


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

print(sum)

Solution (Python):
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """3
10 2 5
6 3 4"""
        output = """5"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """4
13 21 6 19
11 30 6 15"""
        output = """6"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """1
1
50"""
        output = """0"""
        self.assertIO(input, output)
def resolve():
    N=int(input())
    A=[int(i) for i in input().split()]
    B=[int(i) for i in input().split()]
    print(sum([max(A[i]-B[i],0) for i in range(N)]))

if __name__ == "__main__":
    resolve()

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

V_C = zip(V, C)
ans = 0

for x in V_C:
    diff = x[0] - x[1]
    ans += diff if diff >= 0 else 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):
    d = v[i] - c[i]
    if 0 < d:
        ans += d
print(int(ans))

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

plus_jewel = list(filter(lambda x: x[0] - x[1] > 0, zip(v, c)))

print(sum(map(lambda x: x[0] - x[1], plus_jewel)))

Solution (Python):
n = int(input())
lst_v = list(map(int,input().split()))
lst_c = list(map(int,input().split()))
ans = 0
for i in range(n):
    if lst_v[i] > lst_c[i]:
        ans += lst_v[i] - lst_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(0,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):
def solve():
    n = int(input())
    V = map(int, input().split())
    C = map(int, input().split())
    P = [v-c for v,c in zip(V,C) if v>c]
    return sum(P)
    
if __name__ == '__main__':
    print(solve())