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

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

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

print(profit)

Solution (Python):
import sys

def parse(inp):
    n=int(next(inp))
    v=list(map(int,next(inp).split()))
    c=list(map(int,next(inp).split()))    
    return n,v,c
  
def main(inp):
    n,v,c=inp    
    ans = 0
    for i in range(n):
        if(v[i]-c[i]>0): ans +=  v[i]-c[i]            
    return ans
  
print(main(parse(sys.stdin)))

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime,random
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

N = int(input())
VV = inpl()
CC = inpl()

ans = 0
for i in range(N):
    tmp = VV[i] - CC[i]
    if tmp > 0:
        ans += tmp
print(ans)

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

V_C = []
for i in range(len(V)):
    V_C.append(V[i] - C[i])

result = 0
for i in range(len(V_C)):
    if V_C[i] > 0:
        result += V_C[i]

print(result)

Solution (Python):
N = int(input())
VV = [int(i) for i in input().split()]
CC = [int(i) for i in input().split()]
result = 0
for i in range(N):
    Vi,Ci = VV[i],CC[i]
    if Vi - Ci > 0:
        result += Vi-Ci

print(result)

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

v_c = v -c
v =np.sort(v_c)[::-1]
ans = 0
for i in range(n):
    if v[i]>=0:
        ans += v[i]

print(ans)

Solution (Python):
n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
rieki = []

for i in range(n):
  rieki.append(x[i]-y[i])

count = 0  
for i in rieki:
  if i >0:
    count+=i

print(count)

Solution (Python):
import numpy as np

n=int(input())
v_array=[]
c_array=[]
v_array=map(int,input().split())
c_array=map(int,input().split())


d_array = np.array(list(v_array))-np.array(list(c_array))

plus_array = d_array[d_array > 0]
plus_array = np.array(plus_array)
print(np.sum(plus_array))

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

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

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

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

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

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

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

xpy = 0

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

print(xpy)

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

VC = sorted(zip(V, C), key=lambda x:x[0])[::-1]

vsum = csum = 0
dmax = 0
for i in range(N):
	if VC[i][1] < VC[i][0]:
		vsum += VC[i][0]
		csum += VC[i][1]
		dmax = max(dmax, vsum - csum)
print(dmax)

Solution (Python):
N = int(input())
V= list(map(int,input().split()))
C= list(map(int,input().split()))
v_c = [v-c for v,c in  zip(V,C)]
v_c = sorted(v_c)[::-1]
cand = [sum(v_c[:i] )for i in range(N+1)]

print(max(cand))

Solution (Python):
num = int(input())
valuation = list(map(int,input().split()))
cost = list(map(int,input().split()))

div = []
ans = 0

for i in range(len(valuation)):
    div.append(valuation[i] - cost[i])

for j in div:
    if j > 0:
        ans += j

print(ans)

Solution (Python):
import itertools


n = input()
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
dif = []

for kati,nedan in zip(v,c):
	dif.append(kati-nedan)

max = -1

for L in range(len(dif)+1):
	for subset in itertools.combinations(dif, L):
		s = sum(subset)
		if(max < s):
			max = s

print(max)

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

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

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

R=0

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

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

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

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

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

Solution (Python):

inputs = [input() for i in range(3)]
N = int(inputs[0])
V = inputs[1].split()
C = inputs[2].split()

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

print(TR)

Solution (Python):


import itertools
from collections import Counter
from collections import defaultdict
import bisect

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

if __name__ == '__main__':
    main()

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])
    else:
        pass
print(sum(l))

Solution (Python):
S = int(input())
import numpy as np
values = list(map(int, input().split()))
values2 = np.array(values)
costs = list(map(int, input().split()))
cost2 = np.array(costs)
tes=values2-cost2
kotae=0
for i in range(S):
  value=tes[i]
  if value >= 0:
    kotae=kotae+tes[i]


print(kotae)

Solution (Python):
N  = int(input())
valueList = list(map(int, input().split()))
costList = list(map(int, input().split()))
S = 0
total = 0

for i in range(N):
    S = valueList[i]-costList[i]
    if S >0:
        total += S
print(total)

Solution (Python):

n = int(input()) 
vlist = list(map(int, input().split()))
clist = list(map(int, input().split()))

ans = 0
for i, v in enumerate(vlist):
  netV = vlist[i] - clist[i]
  if netV >= 0:
    ans += netV

print("{}".format(ans))

Solution (Python):
n = int(input())
size = list(map(int, input().split()))
price = list(map(int, input().split()))

ans = 0

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

print(ans)

Solution (Python):
def ans():
  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)

ans()

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

print(x)

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

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

Solution (Python):
N=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
t=0
ans=[0]*N
while t<N:
    ans[t]=v[t]-c[t]
    t=t+1
kotae=0
s=0
while s<N:
    if ans[s]>=0:
        kotae=kotae+ans[s]
    s=s+1
print(kotae)

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

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

vsum = 0
csum = 0

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

print(vsum - csum)

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

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

v_c = []

for i, j in zip(v, c):
    if i - j >= 0:
        v_c.append(i-j)

print(sum(v_c))

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

diff = 0;

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

print(diff);

Solution (Python):

a = int(input())

xList = [int(i) for i in input().split()]
cList = [int(i) for i in input().split()]
kati = 0
for i in range(a):
    if(xList[i] > cList[i]):
        kati = kati + (xList[i] - cList[i])

print(kati)

Solution (Python):
import math
from sys import stdin
import numpy as np

n = int(stdin.readline().rstrip())

data = [stdin.readline().rstrip().split() for _ in range(2)]
V = np.array(list(map(lambda x: int(x), data[0])))
C = np.array(list(map(lambda x: int(x), data[1])))
difference = V- C
difference[difference < 0.] = 0
print(np.sum(difference))

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

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

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


a=0
b1=0
b2=0
while a<n:
    if (v[a]-c[a])>0:
        b1+=int(v[a])
        b2+=int(c[a])
    a+=1


print(b1-b2)

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

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

    total = 0

    for g in zip(map(int, input().split()), map(int, input().split())):
        if g[0] > g[1]:
            total += (g[0] - g[1])
    print(total)


main()

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

Solution (Python):
N = int(input())
V = list()
C = list()
plus = list()

for i, j in zip(range(N), input().split()):
    V.append(int(j))
for i, j in zip(range(N), input().split()):
    C.append(int(j))

for i, j in zip(V, C):
    if i-j > 0:
        plus.append(i-j)

print(sum(plus))

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

Vi = map(int, raw_input().split(" "))
Ci = map(int, raw_input().split(" "))

maxV = 0
for i in range(N):
    tmp = Vi[i] - Ci[i]
    maxV += tmp if tmp>0 else 0

print maxV

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

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

import numpy as np
V = np.array(V)
C = np.array(C)
Z = V - C

Z.sort()
Z = Z[Z > 0]
print(sum(Z))

Solution (Python):
import numpy as np

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


A = list(np.array(Vs) - np.array(Cs))

sum_ = 0
for i in A:
    if i>0:
        sum_+=i
print(sum_)

Solution (Python):
N= int(input())
v_list = list(map(int, input().split()))
c_list = list(map(int,input().split()))
v_list = [i-j  for(i,j) in zip(v_list,c_list)]
s=[x for x in v_list if x>0]

print(sum(s))

Solution (Python):


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

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

print(profit)

Solution (Python):
n = int(input())
ans = 0
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()))
result = 0
for i in range(n):
    score = v[i] - c[i]
    if score > 0:
        result += score
print(result)

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

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

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

for i in c:
    if i>=0:
        ans+=i
print(ans)

Solution (Python):
n = int(input())
vl = input().split()
cl = input().split()
i = 0
sum = 0

for i in range(n):
    if int(vl[i]) < int(cl[i]):
        continue
    else:
        sum += int(vl[i]) - int(cl[i])

print(sum)

Solution (Python):
import sys
import io
import math
import re

datalist = input().split()
num_summit = int(datalist[0])

array_1=[]
array_2=[]

array_1 = input().split()
array_2 = input().split()

sum=0

for num in range(num_summit):
    if int(array_1[num])-int(array_2[num]) > 0:
        sum += int(array_1[num])-int(array_2[num])
print(sum)

Solution (Python):

import re
import math

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

a = 0

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

print(a)

Solution (Python):


from sys import stdin

input = stdin.readline

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

X_Y = []

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

X_Y.sort(reverse=True)

result = 0

for x_y in X_Y:
    if x_y >= 0:
        result += x_y
    else:
        break

print(result)

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

print(sum)

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

x = []
 
for i in range(n):
    x.append(int(v[i]-c[i]))
 
x.sort()
 
y = 0
 
i = n-1
 
while x[i] >= 0 and i >= 0 :
    y += x[i]
    i += -1
 
print(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):
    re = V[i] - C[i]
    if re > 0:
        ans += re
print(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]>0:
        A.append(V[i]-C[i])

print(sum(A))

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

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

Solution (Python):
import itertools

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

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

max = 0

for s in sub:
    if s > 0:
        max += s

print(max)

Solution (Python):
n = input()
v = raw_input().split()
c = raw_input().split()
a = 0

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

print a

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

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

def wa(i):
    return v[i] - c[i]

x = [wa(i) for i in range(n)]
x.sort(reverse=True)
res = 0
for e in x:
    if e > 0:
        res += e
    else:
        break

print(res)

Solution (Python):
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
B = [x - y for (x, y) in zip(V, C)]
print(sum([i for i in B if i > 0]))

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

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

diff = [max(v-c,0) for v,c in zip(Vs,Cs)]
print(sum(diff))

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

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

Solution (Python):
N = int(input())
V = list(map(int, input().split(" ")))
C = list(map(int, input().split(" ")))
print(sum(list(filter(lambda x: x > 0, [V[i] - C[i] for i in range(N)]))))

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

    diff = [vv - cc for vv, cc in zip(v, c) if vv - cc > 0]
    print(sum(diff))


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
v = list(int(n) for n in input().split())
c = list(int(n) for n in input().split())
sum = 0
vc = [v - c for (v, c) in zip(v, c)]



for i in range(n):
    if 0 < vc[i]:
        sum += vc[i]

print(sum)

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

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

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

count = 0

for i in range(n):
    dif = v[i]-c[i]
    if dif < 0:
        pass
    else:
        count += dif
        
print(count)

Solution (Python):
from itertools import product

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

L = []
for i in range(N) :
    L.append([V[i],C[i]])
L = sorted(L, key=lambda x: x[0])

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

Solution (Python):
import numpy as np

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

result = 0;

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

Solution (Python):
from sys import stdin
input=[]
for i in range(3):
  input.append(stdin.readline().rstrip().split())


N=int(input[0][0])
V=[]
for i in input[1]:
    V.append(int(i))
C=[]
for i in input[2]:
    C.append(int(i))


diff=[]
for i in range(len(V)):
    diff.append(V[i]-C[i])

output=0
for i in diff:
    if i>0:
        output+=i

print(output)

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

sa = [0] * N

for i in range(N) :
  sa[i] = V[i] - C[i]
sa.sort()
sa.reverse()

ans = 0
for i in sa :
  if i < 0 :
    break
  ans += i
print(ans)

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

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

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

ans = 0


for v, c in zip(V, C):

    if v > c:

        ans += (v-c)

print(ans)

Solution (Python):
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
N = listA[0]
V = listA[1]
C = listA[2]

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

Solution (Python):
n = int(input())
values = map(int, input().split())
costs = map(int, input().split())
total = 0
for v, c in zip(values, costs):
    diff = v - c
    if diff > 0:
        total += diff
print(total)

Solution (Python):
num_of_jewels = int(input())
value_list = input().split()
value_list_i = [int(s, 0) for s in value_list]
cost_list = input().split()
cost_list_i = [int(s, 0) for s in cost_list]
total_value = 0
for i in range(num_of_jewels):
    if value_list_i[i] - cost_list_i[i] > 0:
        total_value = total_value + value_list_i[i] - cost_list_i[i]
print('%d' % total_value)

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

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

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list()
for benefit, cost in zip(a, b):
  if benefit - cost > 0:
    c.append(benefit - cost)
print(sum(c))

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

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

ans = -float('inf')
d = len(V)
for b in range(2 ** d):
    tmp = 0
    for j in range(d):
        if ((b >> j) & 1):
            tmp += V[j] - C[j]
    ans = max(ans, tmp)
print(ans)

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

sum = 0

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

print(sum)

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

tmp_c = 0
tmp_v = 0

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

print(tmp_v-tmp_c)

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)]
x.sort(reverse=True)
i=0
ans=0
while x[i]>0 :
    ans+=x[i]
    i=i+1
    if i==n:
        break
print(ans)

Solution (Python):
N = int(input())
V = list(map(int, input().split()))
C = list(map(int, input().split()))
x, y = 0, 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())
lis1=list(map(int,input().split()))
lis2=list(map(int,input().split()))
lis3=lis1

for i in range(N):
    lis3[i]=lis1[i]-lis2[i]

sum=0
for j in range(N):
    if lis3[j]>0:
        sum=sum+lis3[j]

print(sum)

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

V = V.split(' ')
C = C.split(' ')

sagaku = []
X = 0
Y = 0

for i, kakaku in enumerate(V):
    sagaku.append(int(kakaku) - int(C[i]))
    if int(kakaku) - int(C[i]) > 0:
        X += int(kakaku)
        Y += int(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):
def games(n,v,c):
    sum = 0
    for i in range(int(n)):
        if v[i]-c[i]>=0:
            sum = sum+v[i]-c[i]
    return sum
n = input()
v=list(map(int, input().split()))
c=list(map(int, input().split()))
print(games(n,v,c))

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

V_list_str = input().split()
V_list_int = list(map(int,V_list_str))
C_list_str = input().split()
C_list_int = list(map(int,C_list_str))

max = 0
div_list = []

for i in range(N):
    div_list.append(V_list_int[i]-C_list_int[i])
    if div_list[i] > 0:
        max += div_list[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(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 = []
for i, j in zip(v, c):
    t.append(i - j)
t = sorted(t)[::-1]
res = 0
for i in t:
    if i > 0:
        res += i
print(res)

Solution (Python):
t = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
a = sum(v)
b = sum(c)
mxx = a-b
for i in range(t):
    temp = a-b
    a1 = a - v[i]
    b1 = b - c[i]
    if((a1-b1)>temp):
        a = a1
        b = b1
        mxx = a-b
        
print(mxx)

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

import numpy as np

V_e = np.array(V)
C_e = np.array(C)

F_e = V_e - C_e

F = F_e.tolist()
G = []
for i in range(N):
    if F[i] >= 0:
        G.append(F[i])
print(sum(G))

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits


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


def INT(): return int(input())


def MAP(): return map(int, input().split())


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


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

n = INT()

v = LIST()

c = LIST()

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

print(ans)

Solution (Python):
n = int(input().strip())
arrayV = list(map(int, input().strip().split(' ')))
arrayC = list(map(int, input().strip().split(' ')))
ans = 0
for i in range(n):
    netV = arrayV[i] - arrayC[i]
    if netV > 0:
        ans = ans + netV
print(ans)

Solution (Python):
n = input()
v_li = map(int, input().split())
c_li = map(int, input().split())

max = 0
for v, c in zip(v_li, c_li):
  if v > c:
    max += v - c
print(max)

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

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

tt = 0
for i in range(N):
    k = int(v[i])-int(c[i])
    if k>0:
        tt +=k
print(tt)

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

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

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

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

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

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

    
    
    
    
    
    
    
    
    
    

if __name__ == '__main__':
    main()

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

Solution (Python):
n=int(input())
v=list(map(int, input().split()))
c=list(map(int, input().split()))
x = 0
y = 0
z = []
min = 1000000

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

ans1 = z[0]
for i in range(1, n):
  if ans1 < ans1 + z[i]:
    ans1 += z[i]

ans2 = 0
for i in range(1, n):
  if ans2 < ans2 + z[i]:
    ans2 += z[i]

print(max(ans1, ans2))

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

p = []
for ci,vi in zip(c,v):
    if vi >= ci:
        p.append(vi-ci)

if p:
    print(sum(p))
else:
    print(0)

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

plus=[]
for i,v in enumerate(V):
    if int(v)-int(C[i])>0:
        plus.append(int(v)-int(C[i]))
sum=0        
for p in plus:
    sum+=p

print(sum)

Solution (Python):


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

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

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

value = v-c
total = 0

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

print(total)

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

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

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

Solution (Python):


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

print(sum([ i-k for i, k in zip(value, cost) if i > k]))