Problem:
 Score : 200 points    Problem Statement There are N gems. The value of the i -th gem is V_i .  You will choose some of these gems, possibly all or none, and get them.  However, you need to pay a cost of C_i to get the i -th gem.  Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid.  Find the maximum possible value of X-Y .      Constraints  All values in input are integers.  1 \leq N \leq 20  1 \leq C_i, V_i \leq 50         Input Input is given from Standard Input in the following format:  N  V_1  V_2  ...  V_N  C_1  C_2  ...  C_N       Output Print the maximum possible value of X-Y .        Sample Input 1 3
10 2 5
6 3 4      Sample Output 1 5  If we choose the first and third gems, X = 10 + 5 = 15 and Y = 6 + 4 = 10 .
We have X-Y = 5 here, which is the maximum possible value.       Sample Input 2 4
13 21 6 19
11 30 6 15      Sample Output 2 6       Sample Input 3 1
1
50      Sample Output 3 0

Solution (Python):


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

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

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

print(count)

Solution (Python):



'''a,b= map(int,input().split())'''




N=int(input())
li= [int(x) for x in input().split()]
li1=[int(x) for x in input().split()]
ans=0

for i in range(N):
  if li[i]>=li1[i]:
    ans+=li[i]-li1[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()))

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

Solution (Python):


n = int(input().rstrip())

v_list = list(map(int, input().rstrip().split(" ")))
c_list = list(map(int, input().rstrip().split(" ")))

ans = sum([j for j in [v_list[i] - c_list[i] for i in range(n)] if j > 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(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):
import numpy as np
n = int(input())
v = np.array(list(map(int, input().split())))
c = np.array(list(map(int, input().split())))
ans = 0
for i,j in zip(v,c):
  if i-j>=0:
    ans+=(i-j)
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())))
r = v-c
print(sum(r[r>=0]))

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 vi, ci in zip(v, c):
    if vi >= ci:
        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 i in range(2**n):
    
    X, Y = 0, 0
    for j in range(n):
        if (i >> j) & 1 == 1:
            X += v[j]
            Y += c[j]
            
    if ans < X - Y:
        ans = X - Y
    

print(ans)

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

kachi = 0

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

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

profit = []
for v, c in zip(V, C):
  profit.append(v - c)


profit.sort(reverse=True)

ans = 0
for p in profit:
  if p > 0:
    ans += p
  else:
    break

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



def main():
  n = int(input())
  vs = list(map(int, input().strip().split()))
  cs = list(map(int, input().strip().split()))
  sum = 0
  for x in sorted([v - c for (v, c) in zip(vs, cs)], reverse=True):
    if x <= 0:
      break
    sum += x
  print(sum)

if __name__=='__main__':
  main()

Solution (Python):
import math

def main():
    n = int(input())
    v = [int(t)for t in input().split()]
    c = [int(t)for t in input().split()]

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

    print(sum(e))
    
if __name__ == "__main__":
    main()

Solution (Python):
def main():
    
    
    
    n = int(input())
    
    
    
    
    
    
    
    
    
    v = map(int, input().split())
    c = map(int, input().split())
    l = sorted([i[0]-i[1] for i in zip(v,c) if (i[0]-i[1]) > 0 ])
    print(sum(l))

if __name__ == '__main__':
    main()

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())
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):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


n = int(input())
vv = list(map(int, input().split()))
cc = list(map(int, input().split()))
ans = 0
for v, c in zip(vv, cc):
    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()))
output = 0
for i in range(N):
    XY = V[i] - C[i]
    if XY>0:
        output += XY
print(output)

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

    def search(i, select, value, cost):
        if i == N:
            return value - cost
        ans1 = search(i + 1, select, value, cost)
        ans2 = search(i + 1, select | (1 << i), value + V[i], cost + C[i])
        return max(ans1, ans2)

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

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


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

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

diff_plus = [i - j for i, j in zip(value, cost) if (i - j) > 0]
print(sum(diff_plus))

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

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 = ans + d
print(ans)

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

Solution (Python):
import sys
input = sys.stdin.readline
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()))

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

print(m)

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

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

ans = sum(filter(lambda x: x>0, diff))

print(ans)

Solution (Python):

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

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

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

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 = 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()))
cp=[i-j for i, j in zip(v,c)]
ans=0
for a in sorted(cp,reverse=True):
    if a>=0:
        ans+=a
    else:
        break
print(ans)

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

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

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

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

Solution (Python):
from itertools import product as p

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

ans = 0
for a in p(range(2), repeat=N):
    X, Y = 0, 0
    for i, j in enumerate(a):
        if j:
            X+=V[i]
            Y+=C[i]
    ans = max(ans, X-Y)
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()))
dp = [v[i]-c[i] for i in range(n)]
ans = 0
for i in range(n):
    if dp[i]>=0:
        ans += dp[i]
print(ans)

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

Solution (Python):

import sys

N=input()
V=map(int, sys.stdin.readline().split())
C=map(int, sys.stdin.readline().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(len(v)):
    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()))

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

Solution (Python):



n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
e = [v - c for v, c in zip(v, c) if v - c > 0]
print(sum(e)) if len(e) > 0 else print(0)

Solution (Python):
n = int(input())
stone_v = [int(i) for i in input().split()]
stone_c = [int(i) for i in input().split()]
mx = 0
for i in range(n):
    a = stone_v[i]-stone_c[i]
    if mx < mx+a:
        mx += a
print(mx)

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

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

Solution (Python):




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

    print(result)


if __name__ == "__main__":
    main()

Solution (Python):
print(sum(max(x-y,0)for x,y in zip(*[map(int,t.split())for t in open(0)][1:])))

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

Solution (Python):
def main(n,v,c):
    sumVal = 0
    for i in range(n):
        if v[i] > c[i]:
            sumVal += v[i] - c[i]
    return sumVal

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

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

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

ans = 0

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

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

Solution (Python):
N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
X=[]
Y=[]
for i in range(N):
  if V[i]>C[i]:
    X.append(V[i])
    Y.append(C[i])
x=sum(X)
y=sum(Y)
print(x-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]
    else:
        continue

print(sum)

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

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

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

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]
  else:
    pass
print(x-y)

Solution (Python):
import numpy as np

def main():
    n = int(input())
    value_list = list(map(int, input().split()))
    cost_list = list(map(int, input().split()))

    ans = 0

    value_list = np.array(value_list)
    cost_list = np.array(cost_list)

    value_list -= cost_list

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

    print(ans)

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

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

ans = [int(x) for x in lst if x >= 0]

print(sum(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):
    res += max(0,v[i]-c[i])
print(res)

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

ans = 0

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

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

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def main():
    _ = INT()
    V = LIST()
    C = LIST()

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

    print(ans)


if __name__ == '__main__':
    main()

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())))
vc = v-c
answer = [x for x in vc if x > 0]
print(sum(answer))

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

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

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

ans = 0

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

print(ans)

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

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

m=0

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):
import sys
import numpy as np
input = sys.stdin.readline
n = int(input())
value = np.array(tuple(map(int, input().split())))
cost = np.array(tuple(map(int, input().split())))
np.maximum(value - cost, 0, out=value)
print(np.sum(value))

Solution (Python):
import numpy as np
n = int(input())
value = np.array(tuple(map(int, input().split())))
cost = np.array(tuple(map(int, input().split())))
np.maximum(value - cost, 0, out=value)
print(np.sum(value))

Solution (Python):
import numpy as np
n = int(input())
value = np.array(tuple(map(int, input().split())))
cost = np.array(tuple(map(int, input().split())))
xy = value - cost
np.maximum(xy, 0, out=xy)
print(np.sum(xy))

Solution (Python):
import numpy as np
n = int(input())
value = np.array(tuple(map(int, input().split())))
cost = np.array(tuple(map(int, input().split())))
xy = value - cost
aa = np.zeros(n, dtype=int)
np.maximum(xy, aa, out=xy)
print(int(sum(xy)))

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

inf = -100
dp = [inf] * (n+1)
dp[1] = max(0, value[0]-cost[0])
for i in range(2, n+1):
    dp[i] = max(dp[i-1], dp[i-1]+value[i-1]-cost[i-1])

print(dp[n])

Solution (Python):
import numpy as np
n = int(input())
value = np.array(tuple(map(int, input().split())))
cost = np.array(tuple(map(int, input().split())))
xy = value - cost
ans = 0
for i in range(n):
    if xy[i] < 0:
        continue
    else:
        ans += xy[i]
print(ans)

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

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

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

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

diff = [x - y for (x, y) in zip(v, c)]
ans = sum([x for x in diff if x > 0])
print(ans)

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

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

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

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

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

print(sum)

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

Solution (Python):

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

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

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

print(ans)

Solution (Python):
n=int(input())
a=list(map(int, input().split(' ')))
b=list(map(int, input().split(' ')))

ans = 0
for i, j in zip(a,b):
	ans += max(0, i-j)
print(ans)

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

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n = ni()
v = na()
c = na()

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

print(ans)

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

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

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

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

dif.sort(reverse=True)

i=0
for i in range(N):
    if dif[i]>=0:
        count=count+dif[i]
    else:
        break

print(count)

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

Solution (Python):
n=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
P=[]
for v,c in zip(V,C):
    p=v-c
    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()))

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N = int(input())
    V = tuple(map(int, input().split()))
    C = tuple(map(int, input().split()))

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

if __name__ == '__main__':
    main()

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

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

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

print(answer)

Solution (Python):
N, *V = map(int, open(0).read().split())
s = 0
for i in range(N):
    v = V[i]
    c = V[i+N]
    d = v - c
    s += (v-c if v-c > 0 else 0)
print(s)

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 = 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, *V = map(int, open(0).read().split())
s = 0

for i in range(N):
    v = V[i]
    c = V[i+N]
    s += (v - c if v - c > 0 else 0)

print(s)

Solution (Python):
import sys
import numpy as np

I = np.array(sys.stdin.read().split(), dtype=np.int64)
n = I[0]
v, c = I[1:].reshape(2, n)

def main():
    return np.sum(np.maximum(v - c, 0))

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

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

Solution (Python):
import sys
import math

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 c, v in zip(C, V):
    if v - c > 0:
        ans += v - c
print(ans)

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

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

print(sum(max(v-c,0) for v,c in zip(lv,lc)))

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

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

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
ans = 0
for i,j in zip(V,C):
    ans += max(0,i-j)
print(ans)

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

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

ans = 0

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

print(ans)

Solution (Python):
import numpy as np 

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

ans = 0

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

print(ans)

Solution (Python):
import numpy as np 

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

A = []

for i,j in zip(V,C):
    A.append(i-j)

A = np.array(A)

print(np.sum(A[A>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 = list(map(int, input().split()))
C = list(map(int, input().split()))

D = [v-c for v, c in zip(V, C)]

take = [d for d in D if d > 0]
print(sum(take))

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

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

Solution (Python):
n = int(input())
vList = list(map(int,input().split()))
pList = list(map(int,input().split()))

for i in range(n):
  vList[i] -= pList[i]

resultList = sorted(vList,reverse = True)

count = 0
for i in resultList:
  if i > 0:
    count += i
  else:
    break

print(count)

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()))
print(sum(max(v[i] - c[i], 0) for i in range(n)))

Solution (Python):

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

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


        ans += v[i] - c[i]

print(ans)

Solution (Python):
N = int(input())
Vs = [int(s) for s in input().split(' ')]
Cs = [int(s) for s in input().split(' ')]
cost = 0
for v, c in zip(Vs, Cs):
    cost += max(0, v - c)

print(cost)

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

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

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

Solution (Python):
import os, sys, re, math

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

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