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 = [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):
n=int(input())
v=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
a=[v[i]-c[i] for i in range(n)]
print(sum(i if i>0 else 0 for i in a))

Solution (Python):

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

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

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

print(answer)

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

Solution (Python):
_ = input()
liv = list(map(int,input().split()))
lic = list(map(int,input().split()))
ans = 0
for i,j in zip(liv,lic):
  if i-j > 0:
    ans += i-j
print(ans)

Solution (Python):
n = int(input())
vlt = input().split()
clt = input().split()

for i in range(0, len(vlt)):
    vlt[i] = int(vlt[i])
for i in range(0, len(clt)):
    clt[i] = int(clt[i])

sum_v = 0
sum_cost = 0
for i in range(0, len(vlt)):
    if vlt[i] > clt[i]:
        sum_v += vlt[i]
        sum_cost += clt[i]

print(sum_v - sum_cost)

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

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

print(output)

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

print(output)

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

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])
total = 0
for i in ans:
    if i>=1:
        total+=i
print(max(total,0))

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):
n1 = int(input())
nl1 = [int(i1) for i1 in input().split()]
nl2 = [int(i2) for i2 in input().split()]

s1 = 0
for i3 in range(n1):
    if nl1[i3] - nl2[i3] >= 0:
        s1 += nl1[i3] - nl2[i3] 

print(str(s1))

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

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

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

Solution (Python):


N = input()
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
vc = [_v - _c for _v, _c in zip(v, c)]
s = sum([_vc for _vc in vc if _vc > 0])
print(s)

Solution (Python):


N = input()
vc = [_v - _c for _v, _c in zip([int(i) for i in input().split()], [int(i) for i in input().split()])]
s = sum([_vc for _vc in vc if _vc > 0])
print(s)

Solution (Python):


N = input()
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
vc = [_v - _c for _v, _c in zip(v, c)]

sum = 0
for _vc in vc:
    if _vc >0:
        sum += _vc
print(sum)

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

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

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

import numpy as np
A = np.array(V) - np.array(C)
print(A[A>0].sum())

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
B = list(map(lambda x,y:0 if 0>x-y else x-y ,V,C))
print(sum(B))

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

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

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 = 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]:
        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(0, v[i] - c[i])

print(ans)

Solution (Python):
N=int(input())
LV=list(map(int,input().split()))
LC=list(map(int,input().split()))
Lbenefit=[]
ans=0

for i in range(N):
    Lbenefit.append(LV[i]-LC[i])
Lbenefit.sort(reverse=True)

for b in Lbenefit:
    if b>=0:
        ans+=b
    else:
        break

print(ans)

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

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

print(added_value)

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

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

print(total)

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):
from sys import stdin









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

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


if __name__ == "__main__":
    main()

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):
        ans += max(V[i]-C[i], 0)
    print(ans)
if __name__ == '__main__':
    main()

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

Solution (Python):
n=input()

a=map(int,raw_input().split())
b=map(int,raw_input().split())

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

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

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

ans = 0

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

print (ans)

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

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

print(res)

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

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

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

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

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

def wa_only_pos(list):
    a = 0
    for i in range(n):
        if list[i] > 0:
            a = a+list[i]
    return a

v_in = input().split()
v = []
for i in range(n):
    v.append(int(v_in[i]))

c_in = input().split()
c = []
for i in range(n):
    c.append(int(c_in[i]))

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

print(wa_only_pos(sub))

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

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

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

max = 0

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

print(max)

Solution (Python):
import sys

N=input()
if N.isdecimal() == 0 or int(N)<1 or int(N)>20 :
    print("error")
    sys.exit()

N=int(N)

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


for i in range(N):
    if C[i]<1 or C[i]>50 or V[i]<1 or V[i]>50:
        print("error")
        sys.exit()

diff=0
max_profit=0



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

print(max_profit)

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

Solution (Python):
import sys
input = sys.stdin.readline
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)


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

ans = 0

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

print(ans)

Solution (Python):
n=int(input())
l=[[int(j) for j in input().split()] for i in range(2)]
a=0
for i in range(n):
    if l[0][i]>l[1][i]:
        a+=l[0][i]-l[1][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):
n = int(input())
value = list(map(int, input().split()))
cost = list(map(int, input().split()))
tmp = 0

for i in range(len(value)):
    profit = value[i] - cost[i]
    if profit > 0:
        tmp += profit

print(tmp)

Solution (Python):

"""
Created on Thu May 30 18:10:37 2019

@author: またの
"""

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 = input()
v = input().split()
c = input().split()

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

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

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

total = 0

lst_a = input().split()
lst_b = input().split()

for i in range(n):
    a = int(lst_a[i])
    b = int(lst_b[i])
    if a > b:
        total += (a - b)

print(total)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
X = [max(V, C) for V, C in zip(V, C) if V > C]
Y = [min(V, C) for V, C in zip(V, C) if V > C]
print(sum(X) - sum(Y))

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

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

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

print(ans)

Solution (Python):
def solve(v_list, c_list):
    ans = 0
    for key, value in enumerate(v_list):
        if value > c_list[key]:
            ans += value - c_list[key]
        continue
    return ans


def main():
    n = int(input())
    v_list = list(map(int, input().split()))
    c_list = list(map(int, input().split()))

    ans = solve(v_list, c_list)
    print(ans)


main()

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):
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):
N = int(input())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
ans = 0
         
for i in range(N):
         ans += max(X[i] - Y[i], 0)

print(ans)

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

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

Solution (Python):
n=input().split('\n')
N=int(n[0])
A=input().split('\n')
A=A[0].split()
B=input().split('\n')
B=B[0].split()
answer=0
for i in range(0,N):
  if int(A[i])>int(B[i]):
    answer=answer+int(A[i])-int(B[i])
print(answer)

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

Solution (Python):
n=int(input())
l=[]
l2=[]
for i in range(2):
  l.append(input().split())
for i in range(n):
  l2.append(int(l[0][i])-int(l[1][i]))
t=0
for i in l2:
  if i>0:
    t=t+i
print(t)

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

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

print(ans)

Solution (Python):
n = int(input())
	
v_list = [ int(v) for v in input().split() ]
c_list = [ int(v) for v in input().split() ]
	
ans = sum([ max( 0, (v_list[i]-c_list[i]) ) for i in range(n) ])

print(ans)

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

C.sort(reverse=True)

summed = 0
for i in C:
    if i > 0:
        summed += i
print(summed)

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










import numpy as np
import math
import copy

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

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

print(s)

Solution (Python):
jewel = int(input())
value = [int(i) for i in input().split()]
cost = [int(i) for i in input().split()]
diff = [i-j for i,j in zip(value, cost)]
price = 0
for i in sorted(diff):
    if i>0:
        price += i

print(price)

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

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

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

Solution (Python):
N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
num=0
for i in range(N):

    sum=V[i]-C[i]
    if sum>0:
        num+=sum


print(num)

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

gap = []
if C ==0:
    print(0)
for i, c in enumerate(C):
    for j, v in enumerate(V):
        if i == j:
            if v-c>=0:
                gap.append(v - c)
sum = 0
for v in gap:
    sum += v
print(sum)

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

Solution (Python):
n = int(input())
val = []
for i in map(int, input().split()):
    val.append(i)
cost = []
for i in map(int, input().split()):
    cost.append(i)

ans = 0
for i in range(n):
    m = val[i] - cost[i]
    if m > 0:
        ans += m

print(ans)

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

for i in cost:
    if i > 0:
        ans += 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 = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

max = 0

for i in range(N):
    x = v[i] - c[i]
    if 0 < x:
        max += x

print(max)

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

Solution (Python):


if __name__ == '__main__':
    n = int(input())
    v = list(map(int, input().split()))
    c = list(map(int, input().split()))
    
    ans = 0
    for x, y in zip(v, c):
        tmp = x - y
        if tmp > 0:
            ans += tmp

    print(ans)

Solution (Python):
n = int(input())
lisa = list(map(int, input().split()))
lisb = list(map(int, input().split()))
lisc = []
total = 0
for i in range(n):
    lisc.append(lisa[i] - lisb[i])
for j in lisc:
    if j > 0:
        total += j
print(total)

Solution (Python):
n=int(input())
v=list(input().split())
c=list(input().split())
mon=[0]

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

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

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

print(sum(anslist))

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

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

dif.sort()

mx=0
for val in dif:
	if val>=0:
		mx+=val

print(mx)

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

sum = 0

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

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

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

print(sum)

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

ans = 0

for vv, cc in zip(V, C):
    if vv > cc:
        ans += (vv - cc)

print(ans)

Solution (Python):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
res = 0
for val,cost in zip(v,c) :
	res += (val-cost) if val > cost else 0
print(res)

Solution (Python):

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

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

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

print(ans)

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

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

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

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

value = list(map(int,input().split()))
cost = list(map(int,input().split()))

revenue = 0

for i in range(n):
    if value[i]>cost[i]:
        revenue = revenue + value[i] - cost[i]

print(revenue)

Solution (Python):

n = input()
n = int(n)

total = 0

lst_a = input().split()
lst_b = input().split()

for i in range(0, n ,1):
    a = lst_a[i]
    b = lst_b[i]
    a = int(a)
    b = int(b)
    if a > b:
        total += (a - b)

print(total)

Solution (Python):
N = input()
jewelrys = int(N)
value = input().split()
cost = input().split()
maxsum = 0
i = 0

for i in range(0, jewelrys):
    value[i] = int(value[i])
    cost[i] = int(cost[i])
    if(value[i] > cost[i]):
        maxsum += (value[i] - cost[i])

print(maxsum)

Solution (Python):
n = int(input())
in_val = input().split()
in_cos = input().split()

lis_val = [int(s) for s in in_val]
lis_cos = [int(s) for s in in_cos]

sum_vc = 0
for i in range(n):
    if lis_val[i] > lis_cos[i]:
        sum_vc += lis_val[i] - lis_cos[i]
    else:
        continue

print(sum_vc)

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

print(sum(P))

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

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

ans = 0

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

print(ans)

Solution (Python):


N = int(input())
value = list(map(int, input().split()))
cost = list(map(int, input().split()))
ans=0

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

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    V = list(map(int, input().split()))
    C = list(map(int, input().split()))
    
    
    sa = [ V[i] - C[i] if V[i] - C[i] > 0 else 0 for i in range(N) ]
    
    
    sa.sort()
    
    print(sum(sa))
    
if __name__ == '__main__':
    main()

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

print(XY)

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

print(XY)

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

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

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

print(ans)

Solution (Python):
x = 0
y= 0
n = input()
v = list(map(int, input().split()))
c = list(map(int, input().split()))
for (vv,cc) in zip(v,c):
    if cc < vv:
        x+=vv
        y+=cc
print(x-y)

Solution (Python):
from sys import stdin

list_N = [int(x) for x in stdin.readline().rstrip().split()]
list_V = [int(x) for x in stdin.readline().rstrip().split()]
list_C = [int(x) for x in stdin.readline().rstrip().split()]

XsubY=0
for i in range(0, list_N[0]):
    sub = list_V[i] - list_C[i]
    if(sub>0):
        XsubY += sub

print(XsubY)

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

value = 0
cost = 0

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

print(value - cost)

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

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

Solution (Python):


V=[]
C=[]

ans=0
N=0
i=0
N=int(input())

li = input().split()

while(i<N):
    V.append(int(li[i]))
    i=i+1

i=0
li2=0
li2=input().split()

while(i<N):
    C.append(int(li2[i]))
    i = i+1
    
i=0

while(i<N):
    if(V[i]>C[i]):
        ans = ans + V[i] - C[i]
    i = i+1

print(ans)

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

cost =0
for i in range(n):
    sub = v[i]-c[i]
    if sub>0:
        cost += sub
    else:
        pass
print(cost)

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

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

print(sum)

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

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

Solution (Python):
n=int(input())
lv=list(map(int,input().split()))
lc=list(map(int,input().split()))

cnt=0

for i in range(n):
    if lv[i]-lc[i]>0:
        cnt+=lv[i]-lc[i]
print(cnt)

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

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

print(sum)

Solution (Python):
n = int(input())
values = [int(i) for i in input().split()]
costs = [int(i) for i in input().split()]
result = 0

for i in range(n):
    if values[i] > costs[i]:
        result += values[i] - costs[i]

print(result)

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

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

print(sum)

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

Solution (Python):
n = input()
x = list(map(int, input().split()))
y = list(map(int, input().split()))
sum_ = 0

for i in range(len(x)):
    z = x[i] - y[i]
    if z > 0:
        sum_ += z 

print(sum_)

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

max_value = 0

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