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

u = [ x - y for (x,y) in zip(V,C) if x - y >= 0 ]

print(sum(u))

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

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])
    ans += diff if diff >0 else 0

print(ans)

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

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

print(S)

Solution (Python):
a=int(input())
def sei(a):
  v=list(map(int , a.split()))
  return v
buysell=[]
for i in range(2):
  buysell+=[sei(input())]
X=0
for i in range(a):
  if buysell[0][i]>buysell[1][i]:
    X+=buysell[0][i]-buysell[1][i]
print(X)

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline

n = int(input())
v_lst = list(map(int, input().rstrip().split()))
c_lst = list(map(int, input().rstrip().split()))
total = 0
lst = [v_lst[i] - c_lst[i] for i in range(n)]

for i in range(n):
    if lst[i] > 0:
        total += lst[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):
  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):
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):
for i in range(3):
  y = input().split(" ")
  y = list(map(int, y))
  if i == 1:
    value = y
  elif i == 2:
    cost = y

result = 0
for v, c in zip(value, cost):
  if v > c:
    result += v - c

print(result)

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

b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

aiueo = 0

for i in range(len(b)):
    if b[i] > c[i]:
        aiueo += b[i] - c[i]

print(aiueo)

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

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

ans = 0
for vv, cc in zip(v, c):
    ans += max(vv - cc, 0)
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):
  if v[i]-c[i]>0:
    cnt+=v[i]-c[i]
print(cnt)

Solution (Python):
import numpy as np

N=int(input())
V=np.array([int(x) for x in input().split()])
C=np.array([int(x) for x in input().split()])
ans=V-C
print(sum(ans[ans>0]))

Solution (Python):
num = int(input())
lists = [list(map(int,input().split())) for i in range(2)]
nums = [lists[0][j] - lists[1][j] for j in range(num)]
x = 0
for i in nums:
  if i > 0:
    x += i
  else:
    continue
print(x)

Solution (Python):
N = input()
V = list(input().split())
C = list(input().split())
n = 0
list_P =[]

while n < len(V):
    Vn = int(V[n])
    Cn = int(C[n])
    Pn = Vn -Cn
    list_P.append(Pn)
    n += 1

MAX = 0
for X in list_P:
    if X > 0:
        MAX += X
    else:
        continue

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):
n=int(input())
l=[i-j for i,j in zip(map(int,input().split()),map(int,input().split())) if i-j >0]
print(sum(l))

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

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

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

ans = sum([max(v - c, 0) for v, c in zip(V, C)])
print(ans)

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

Solution (Python):
from collections import Counter
from functools import reduce
import bisect
import random
import fractions
import math

import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]  
def LF(): return [float(x) for x in sys.stdin.readline().split()]  
def LS(): return sys.stdin.readline().split()  
def MI(): return map(int, sys.stdin.readline().split())  
def II(): return int(sys.stdin.readline())  
def IS(): return input()  
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):  
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):  
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))


n, v, c = II(), LI(), LI()



y = 0
maxi = -INF
start = time.time()
for i in range(2 ** n):
    x = 0
    y = 0
    for j in range(n):
        if i >> j & 1:
            x += v[j]
            y += c[j]
    maxi = max(maxi, x - y)


print(maxi)

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

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

Solution (Python):
from sys import stdin

def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()



N = ri()
V = ria()
C = ria()

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

print(ma)

Solution (Python):
import numpy;i=input;a=numpy.array;n=int(i());v=a(list(map(int,i().split())));c=a(list(map(int,i().split())));print(sum(numpy.where(v-c>0,v-c,0)))

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

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

vc = sorted([v[i] - c[i] for i in range(n)], reverse=True)

k = 0

for vc_i in vc:
    if vc_i > 0:
        k += vc_i

print(k)

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

Solution (Python):
import numpy as np;i=input;a=np.array;n=int(i());v=a(list(map(int,i().split())));c=a(list(map(int,i().split())));print(sum(np.where(v-c>0,v-c,0)))

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

	
print(ans)

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

print(sum(dif))

Solution (Python):
import numpy as np;i=input;n=int(i());v=np.array(list(map(int,i().split())));c=np.array(list(map(int,i().split())));print(sum(np.where(v-c>0,v-c,0)))

Solution (Python):
N = int(input())
varr = list(map(int, input().split()))
carr = list(map(int, input().split()))
ans = 0
for i in range(N):
    ans += max(varr[i] - carr[i], 0)
print(ans)

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

Solution (Python):
import sys



import numpy as np


"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    
    r, e, p = range, enumerate, print
    ip = IP()
    id = Idea()
    mod = 10 ** 9 + 7

    """この下から書いてね"""
    n = ip.I()
    v = ip.IL()
    c = ip.IL()
    v = np.array(v)
    c = np.array(c)
    o = v - c
    ans = np.where(o > 0, o, 0)
    p(sum(ans))

main()

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, V, C):
    return sum(map(lambda x: x[0]-x[1], filter(lambda x: x[0]>x[1], zip(V, C))))


def main():
    N = read_int()
    V = read_int_n()
    C = read_int_n()
    print(slv(N, V, C))


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys



import numpy as np


"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)


"""ここからメインコード"""


def main():
    
    r, e, p = range, enumerate, print
    ip = IP()
    id = Idea()
    mod = 10 ** 9 + 7

    """この下から書いてね"""
    n = ip.I()
    v = ip.IL()
    c = ip.IL()
    v = np.array(v)
    c = np.array(c)
    o = v - c
    ans = 0
    for x in o:
        if x > 0:
            ans += x
    p(ans)

main()

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

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

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

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

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

Solution (Python):
n = input()
values = list(map(int, input().split()))
costs = list(map(int, input().split()))

maximum = 0
for value, cost in zip(values, costs):
    if value - cost > 0:
        maximum += value - cost

print(maximum)

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

result = 0
for v,c in zip(vList,cList):
    if v-c > 0:
        result += (v-c)

print(result)

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=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
d=[]
max=0
num=0
for i in range(n):
            d.append(v[i]-c[i])
"""
for i in range(n-1):
    num=d[i]

    for k in range(n-i-1):
        if(num+d[i+1+k]>max):
            max=num+d[i+1+k]
"""
d.sort()
d.reverse()
for i in range(n):
    num=max+d[i]
    if num>max:
        max=num

print(max)

Solution (Python):
n = int(input())
b = input()
v = []
v.append(b.split())
v = v[0]
count = 0
for v1 in v:
    v.remove(v1)
    v.insert(count, int(v1))
s = input()
c = []
c.append(s.split())
c = c[0]
count = 0
for c1 in c:
    c.remove(c1)
    c.insert(count, int(c1))
a = []
for (v1,c1) in zip(v,c):
    add = v1 - c1
    a.append(add)
ans = 0
for a1 in a:
    if a1 >= 0:
        ans += a1
print(ans)

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())
b = input()
v = []
v.append(b.split())
v = v[0]
count = 0
for v1 in v:
    v.remove(v1)
    v.insert(count, int(v1))
s = input()
c = []
c.append(s.split())
c = c[0]
count = 0
for c1 in c:
    c.remove(c1)
    c.insert(count, int(c1))
a = []
for (v1,c1) in zip(v,c):
    add = v1 - c1
    a.append(add)
ans = 0
for a1 in a:
    if a1 >= 0:
        ans += a1
print(ans)

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

for i in range(0,N):
    if V[i]>C[i]:
        V_ans.append(V[i])
        C_ans.append(C[i])

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

print(ans)

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

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 += V[i] - C[i]

print(ans)

Solution (Python):
import math

n = int(input())

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

total = 0
cost = 0

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

print(total - cost)

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

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

p = 0
for j in range(0,N):
    if C[j] < V[j]:
        p += V[j]-C[j]
        
print(int(p))

Solution (Python):
import numpy as np

n = input()
v = input().split()
c = input().split()
N = int(n)
V = np.array(v, dtype=int)
C = np.array(c, dtype=int)

max_xy = 0

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

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

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

N = int(input())
v = [int(s) for s in input().split(' ')]
c = [int(s) for s in input().split(' ')]
ret = 0
for i in range(len(v)):
  if v[i] - c[i] > 0:
    ret += v[i] - c[i]
  
print(ret)

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

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()]
results = []

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

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

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

Solution (Python):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
count=0
saidaiti=0
while True:
    if v[count]>c[count]:
        saidaiti=saidaiti+v[count]-c[count]
    count=count+1
    if count==n:
        break
print(saidaiti)

Solution (Python):
N = int(input())
Vs = map(int, input().split())
Cs = map(int, input().split())
Xs = []
for v, c in zip(Vs, Cs):
    Xs.append(v - c)
print(sum(filter(lambda x: x >= 0, Xs)))

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

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

print(ab)

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

Solution (Python):
import numpy as np

N = input()
V = input()
C = input()

A= np.array(list(map(int,V.split( ))))
B= np.array(list(map(int,C.split( ))))

E = A - B
print(np.sum(E[E>0]))

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

Solution (Python):
N = int(input())
V = input().split()
V = [int(v) for v in V]
C = input().split()
C = [int(c) for c in C]
VC = [0] * N
for n in range(N):
    VC[n] = V[n] - C[n]
    if VC[n] < 0:
        VC[n] = 0
S = sum(VC)
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]: X += V[i] - C[i]
print(X)

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

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

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):
  max=V[i]-C[i]

  if max > 0:
    sum=sum+max

print(sum)

Solution (Python):
n=int(raw_input())
a=map(int,raw_input().split())
b=map(int,raw_input().split())
t=0
for i in xrange(n):
	d=a[i]-b[i]
	if d>0:
		t=t+d
print t

Solution (Python):
def max_num(n,N,list):
    for i in range(N):
        if list[i] == n:
            num = n
            break
        return n

N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))
copy_V = []
for i in range(N):
    if V[i] - C[i] < 0:
        V[i] = 0
        copy_V.append(V[i])
        C[i] = 0
    else:
        copy_V.append(V[i])
X = 0
Y = 0
Max = 0
for i in range(N):
    X += max(V)
    tmp = max(V)
    Y += C[copy_V.index(tmp)]
    tmp_1 = copy_V.index(tmp)
    del V[V.index(max(V))]
    if Max < X - Y:
        Max = X - Y
print(Max)

Solution (Python):
_,v,c=[map(int,t.split())for t in open(0)];print(sum((x-y)*(x>y)for x,y in zip(v,c)))

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


sum = 0

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

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

Solution (Python):
X=0
Y=0

N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
for i in range(len(V)):
	if V[i] > C[i]:
		X+=V[i]
		Y+=C[i]

print(X-Y)

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

diff.sort()
diff.reverse()
if len(diff) >= 2:
    print(sum(diff))

elif len(diff) == 1:
    print(diff[0])

elif len(diff) == 0:
    print(0)

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

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


if(__name__ == '__main__'):
    main()

Solution (Python):
N = int(input())
list_V = input().split()
list_C = input().split()
SUM = 0


for i in range(N):
  value = int(list_V[i])-int(list_C[i])
  if value > 0:
    SUM += value

print(SUM)

Solution (Python):
n,*t=map(int,open(0).read().split());print(sum((x-y)*(x>y)for x,y in zip(t[:n],t[n:])))

Solution (Python):

import itertools
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
d = sum([v[i] - c[i] for i in range(n) if v[i] - c[i] > 0])
print(d)

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

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

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
V = [int(x) for x in stdin.readline().rstrip().split()]
C = [int(x) for x in stdin.readline().rstrip().split()]

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

print(max_profits)

exit(0)

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

Solution (Python):

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


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

Solution (Python):
import sys
import numpy as np

N = input()

V = input().split()
v = np.array([ int(x) for x in V])

C = input().split()
c = np.array([ int(x) for x in C])

delt = v - c
print(delt[delt>0].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]:
        v = V[i]
        c = C[i]
        X = X + v
        Y = Y + c

print(X-Y)

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

D=0
while m>=0:
 if V[m]-C[m]>=0:
  D=D+V[m]-C[m]
 else:D=D
 m=m-1

print(D)

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