TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
A,B,T = list(map(int,input().split()))
count = int((T+0.5)/A)
print(count*A)

A,B,T = list(map(int,input().split()))
count = int((T+0.5)/A)
print(count*B)

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a, b, t = map(int, input().split())
print((t+0.5)//a * b)

a, b, t = map(int, input().split())
print(int((t+0.5)//a * b))

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))
b = list(map(abs,a))
c = [a for a in A if a < 0]

if len(c) % 2 == 0:
    print(sum(b))
else:
    print(sum(b)-min(b)*2)


a,b,t = map(int,input().split())
print(t//a*b)

Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
import functools
import fractions
N = int(input())
A_list = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A_list[-i]
    del A_list[-i]
    gcd = functools.reduce(fractions.gcd, A_list)
    ans = max(gcd,ans)
    A_list.append(x)
print(ans)



A,B,T = map(int, input().split())
ans = B*int(T/A)
print(ans)


Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a,b,c = list(map(int, input().split()))
print(a//c * b)

a,b,c = list(map(int, input().split()))
print(c//a * b)

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
def main():
    a,b,t = map(int,input().split())
    ans = 0
    for i in range(t + 1):
        if i % a == 0:
            ans += b
    print(ans)
main()

def main():
    a,b,t = map(int,input().split())
    ans = 0
    for i in range(t + 1, 1):
        if i % a == 0:
            ans += b
    print(ans)
main()

def main():
    a,b,t = map(int,input().split())
    ans = 0
    for i in (t + 1):
        if i % a == 0:
            ans += b
    print(ans)
main()

def main():
    a,b,t = map(int,input().split())
    ans = 0
    for i in range(t + 0.51, 1):
        if i % a == 0:
            ans += b
    print(ans)
main()

def main():
    a,b,t = map(int,input().split())
    ans = 0
    for i in range(1,t + 1, 1):
        if i % a == 0:
            ans += b
    print(ans)
main()

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
import math

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

if n == 2:
    if a[0] > a[1]:
        print(a[0])
    else:
        print(a[1])
    exit()

rev = []
rev.append(a[n-1])
prev_gcd = a[n-1]
for i in range(n-2, 0, -1):
    prev_gcd = math.gcd(prev_gcd, a[i])
    rev.append(prev_gcd)

ans = math.gcd(a[0], rev[-2])
if ans < rev[-1]:
    ans = rev[-1]
        
prev_gcd = a[0]
for i in range(1, n-1):
    prev_gcd = math.gcd(prev_gcd, a[i])
    cand_ans = math.gcd(prev_gcd, rev[-1 - i])
    if cand_ans > ans:
        ans = cand_ans

print(ans)
                  


elem = input().split()
a = int(elem[0])
b = int(elem[1]) 
t = int(elem[2])
    
ans = (t // a) * b


print(ans)


Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a, b, t = map(int, input().split())
print(((t+0.5)//a)*b)

a, b, t = map(int, input().split())
print(int(((t+0.5)//a)*b))

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
S = input().split(' ')
A = int(S[0])
B = int(S[1])
T = int(S[2])

cnt=0
bcnt=0

for i in range(1,30):
    cnt+=i

    if cnt > T:
        break
    else:
        bcnt+=B

print(bcnt)





S = input().split(' ')
A = int(S[0])
B = int(S[1])
T = int(S[2])

cnt=0
bcnt=0

for i in range(1,30):
    cnt=i*A
    if cnt > T:
        break
    else:
        bcnt+=B

print(bcnt)





Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
def make_divisors(n):
	divisors = []
	for i in range(1, int(n**0.5)+1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n//i)
	divisors.sort(reverse=True)
	return divisors

n = int(input())
a = list(map(int,input().split()))
a.append(0)
a.append(0)
a.sort(reverse=True)
ans1 = 0
ans2 = 0
ans3 = 0

result = make_divisors(a[0] - a[2])
for i in range(len(result)):
	next = 0
	for j in range(n):
		if((j != 1) & (a[j] % result[i] != 0)):
			next = 1
			break
	if(next == 0):
		ans1 = result[i]
		break

result = make_divisors(a[0] - a[1])
for i in range(len(result)):
	next = 0
	for j in range(n):
		if((j != 2) & (a[j] % result[i] != 0)):
			next = 1
			break
	if(next == 0):
		ans2 = result[i]
		break

result = make_divisors(a[1] - a[2])
for i in range(len(result)):
	next = 0
	for j in range(n):
		if((j != 0) & (a[j] % result[i] != 0)):
			next = 1
			break
	if(next == 0):
		ans3 = result[i]
		break
max = ans1
if(ans2 > max):
	max = ans2
if(ans3 > max):
	max = ans3
print(max)

def make_divisors(n):
	divisors = []
	for i in range(1, int(n**0.5)+1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n//i)
	divisors.sort(reverse=True)
	return divisors

n = int(input())
a = list(map(int,input().split()))
a.append(0)
a.append(0)
a.sort(reverse=True)
ans1 = 0
ans2 = 0
ans3 = 0

result = make_divisors(a[0] - a[2])
for i in range(len(result)):
	next = 0
	for j in range(n):
		if((j != 1) & (a[j] % result[i] != 0)):
			next = 1
			break
	if(next == 0):
		ans1 = result[i]
		break

result = make_divisors(a[0] - a[1])
for i in range(len(result)):
	next = 0
	for j in range(n):
		if((j != 2) & (a[j] % result[i] != 0)):
			next = 1
			break
	if(next == 0):
		ans2 = result[i]
		break

result = make_divisors(a[1] - a[2])
for i in range(len(result)):
	next = 0
	for j in range(n):
		if((j != 0) & (a[j] % result[i] != 0)):
			next = 1
			break
	if(next == 0):
		ans3 = result[i]
		break
max = ans1
if(ans2 > max):
	max = ans2
if(ans3 > max):
	max = ans3
print(max)


A, B, T = map(int, input().split())
tmp = (T+0.5) / A
print(int(tmp)*B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
import math

N = int(input())
A = list(map(int, input().split()))

gcd_l = [0]
gcd_r = [0]

for i in range(N):
    gcd_l.append(math.gcd(gcd_l[i], A[i]))
    gcd_r.append(math.gcd(gcd_r[i], A[-(i+1)]))
gcd_r = gcd_r[::-1]

ans = []
for i in range(N):
    ans.append(math.gcd(gcd_l[i], gcd_r[i+1]))
print(ans)

A, B, T = map(int, input().split())
ans = 0
t = 0
while t <= T - A:
    ans += B
    t += A
print(ans)

Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
import numpy as np

def gcd_(a, b):
    a_ = max(a, b)
    b_ = min(a, b)

    while True:
        if a_ % b_ == 0:
            return b_
        a_, b_ = b_, a_ % b_

_ = input()
a = np.array([int(x) for x in input().split(" ")])

if len(a) == 2:
    print(gcd_(*a))
    exit()

list = [gcd_(a[2], a[1]), gcd_(a[0], a[2]), gcd_(a[0], a[1])]
gcd = np.max(list)
bad_num = a[np.argmax(list)]

for i in range(3, len(a)):
    if a[i] % gcd == 0:
        continue
    else:
        newgcd = gcd_(a[i], gcd)
        oldgcd = gcd_(bad_num, gcd)

        if newgcd > oldgcd:
            gcd = newgcd
        else:
            gcd = oldgcd
            bad_num = a[i]


print(int(gcd))


a, b, t = [int(x) for x in input().split(" ")]

print(b * int(t / a))

Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a,b,t=map(int,input().split())
print((t+0.5)//a＊b)

a,b,t=map(int,input().split())
print(int(((t+0.5)//a)＊b))

a,b,t=map(int,input().split())
t//=a
print(a*t)

a,b,t=map(int,input().split())
print((t+0.5)＊b/a)

a,b,t=map(int,input().split())
t//=a
print(b*t)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a = int(input())
b= int(input())
c = int(input())
x= int(input())
ans=0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if i*500+j*100+k*50==x:
        ans+=1
print(ans)

A,B,T=map(int, input().split())
print(T//A*B)

Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a,b,t = map(int, input().split())
print(b*((t+0.5)//a)

a,b,t = map(int, input().split())
print(b*((t+0.5)//a))

a,b,t = map(int, input().split())
print(b* int((t+0.5)//a) )

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a,b,t = map(int,input().split())
print(b * ((t+0.5)//a))

a,b,t = map(int,input().split())
print(int(b * ((t+0.5)//a)))

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
A,B,T = map(int, input().split())
X = (T+0.5)//A
print(B*X)

A,B,T = map(int, input().split())
X = (T+0.5)//A
print(B*X)

A,B,T = map(int, input()split())
X = (T+0.5)/A
print(B*X)

A,B,T = map(int, input().split())
X = T//A
print(B*X)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
def main():
    A, B, T = map(int, input().split())
    print(((T+0.5)//A) * B)

    return 0


if __name__ == '__main__':
    main()

def main():
    A, B, T = map(int, input().split())
    print(int(((T+0.5)//A) * B))

    return 0


if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a, b, t = input().split()
a = int(a)
b = int(b)
t = int(t)
n = (t+0.5) // a
ans = n * b
print(ans)


s = input()
a, b, t = s.split()
a = int(a)
b = int(b)
t = int(t)
n = int((t + 0.5) / a)
ans = n * b
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
from fractions import gcd
 
def main():
    n = int(input())
    a = list(map(int, input().split()))
    left = [0]
    right = [0]
    for l in a[:-1]:
        g = gcd(left[-1], l)
        left.append(g)
    for r in a[n:0:-1]:
        g = gcd(right[-1], r)
        right.append(g)
    right.reverse()
    m = 0
    for i in range(n):
        m = max(m, gcd(left[i], right[i]))
    print(m)
    
if __name__ == '__main__':
    main()

def main():
    a, b, t = map(int, input().split())
    c = int((t + 0.5) // a * b)
    print(c)


if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a,b,t=(int(x) for x in input().split())
n=(t+0.5)//a
print(b*n)

a,b,t = (int(x) for x in input().split())
t = t + 0.5
c = a
n = 0
while t >= a :
    a = a + c
    n += 1
print((n)*b)

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
# coding:UTF-8



input_list = input().split()


print((input_list[2] + 0.5) // input_list[0] * input_list[1])

# coding:UTF-8



input_list = input().split()

num_A = int(input_list[0])
num_B = int(input_list[1])
num_T = int(input_list[2])


print((num_T + 0.5) // num_A * num_B)

# coding:UTF-8


input_list = input().split()

num_A = int(input_list[0])
num_B = int(input_list[1])
num_T = int(input_list[2])


output_answer = int((num_T + 0.5) // num_A * num_B)
print(output_answer)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
import numpy as np 
N = int(input())
A =list(map(int, input().strip().split()))
Ap = np.abs(A)
i = 0
m = 0
s = 1
while i <= N - 1:
    if A[i] < 0:
        m += 1
    i += 1
if m % 2 == 0:
    M = np.sum(Ap)
if m % 2 == 1:
    M = np.sum(Ap) - 2 * Ap[0]
    while s <= N - 1:
        M1 = np.sum(Ap) - 2 * Ap[s]
        if M1 > M:
            M = M1
        s += 1
print(M)

import numpy as np 
N = int(input())
A =list(map(int, input().strip().split()))
Ap = np.abs(A)
i = 0
m = 0
s = 0
M = 0
while i <= N - 1:
    if A[i] < 0:
        m += 1
    i += 1
if m % 2 == 0:
    M = np.sum(Ap)
if m % 2 == 1:
    while s <= N - 1:
        M1 = np.sum(Ap) - 2 * Ap[s]
        if M1 >= M:
            M = M1
        s += 1
print(M)

A, B, T = list(map(int, input().strip().split()))
i = 1
X = 0
while A * i < T + 0.5:
  X = X + B
  i += 1
else:
  print(X)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a, b, t = map(int, input().split())
ans = 0
for i in range(100000000):
    if i * a >= t:
        ans += b
    else:
        exit(print(ans))


a, b, t = map(int, input().split())
ans = 0
for i in range(100000000):
    if i * a <= t:
        ans += b
    else:
        exit(print(ans))


a, b, t = map(int, input().split())
print((t // a) * b)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
A,B,T=map(int,input(),split())
num=(T+0.5)//A
print(num*B)

A,B,T=map(int,input().split())
num=(T+0.5)//A
print(int(num*B))


Verdicts: Runtime Error

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
A, B, T = map(int, input().split())
print(B*T//A)

A, B, T = map(int, input().split())
print(T//A * B)

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
a, b, t = map(int, input().split())
num = t / a
print(num * b)

a, b, t = map(int, input().split())
num = t / a
print(int(num) * b)

Verdicts: Wrong Answer

Accepted
Problem: A biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.  Find the total number of biscuits produced within T + 0.5 seconds after activation.

Submission attempts (in order):
# -*- coding: utf-8 -*-

def gcd(a,b):
    if b==0:return a
    return gcd(b,a%b)


n = int(input())

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

if n==2:
    print(max(a))
    exit()
'''
L = [gcd(a[0], a[1])]
R = [gcd(a[n-2], a[n-1])]
'''


L = [0]
R = [0]
for i in range(1,n+1):
    L.append(gcd(L[i-1], a[i-1]))

for i in range(n)[::-1]:
    R.append(gcd(R[i+1], a[i]))


m = []
for i in range(n):
    m.append(gcd(L[i], R[i+1]))

print(max(m))


# -*- coding: utf-8 -*-

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

tt=t+0.5

print((int)(tt/a)*b)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

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

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)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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])

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

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)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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 = cnt + 1
print(cnt)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
V = list(map(int, input()))
C = list(map(int, input()))

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

print(ans)


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

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

print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
num = int(input())
value = map (int,input().split())
price = map (int,input().split())
ans = 0
for i in range(num):
  if value[i] > price[i] :
      income = value[i] - price[i]
      ans += income
print(ans)

num = int(input())
value = tuple( map (int,input().split()))
price = tuple(map (int,input().split()))
ans = 0
for i in range(num):
  if value[i] > price[i] :
      income = value[i] - price[i]
      ans += income
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
V = list(map(int, input().split())
C = list(map(int, input().split())

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


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

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


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

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


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

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

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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
v=[int(i) for i in range(n)]
c=[int(i) for i in range(n)]
ans=[]
for i in range(2**n):
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append(sum_c-sum_v)
print(max(ans))

n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
for i in range(2**n):
	sum_v=0
	sum_c=0
	for j in range(n):
		if (i>>j)&1:
			sum_v+=v[j]
			sum_c+=c[j]
			ans.append[sum_v-sum_c]
print(max(ans))

n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
ans=[]
sum_v=0
sum_c=0
for i in range(n):
	if v[i]-c[i]>=0:
		sum_v+=v[i]
		sum_c+=c[i]
		ans.append(sum_v-sum_c)
try:
	print(max(ans))
except ValueError:
	print("0")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))

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

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
values = [ int(x) for x in range(n) ]
cost = [ int(x) for x in range(n) ]
profit_list = [ value[i] - cost[i] for i in range(n) if value[i] > cost[i] ]
print(sum(profit_list))


n = int(input())
values = [ int(x) for x in input().split() ]
cost = [ int(x) for x in input().split() ]
profit_list = [ values[i] - cost[i] for i in range(n) if values[i] > cost[i] ]
print(sum(profit_list))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
v=map(int,input().split())
c=map(int,input().split())
ans=0
for i in range(n):
    if c[i]-v[i]>0:
        ans+=c[i]-v[i]
print(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]>0:
        ans+=v[i]-c[i]
print(ans)



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if n == 1:
	print(0)
else:
	vals = list(map(int, input().split()))
    costs = list(map(int, input().split()))
 
	total = 0
	for v, c in zip(vals, costs):
    	resale = v - c
        if resale > 0:
        	total += resale
    print(total)

n = int(input())
if n == 1:
	print(0)
else:
	vals = list(map(int, input().split()))
    costs = list(map(int, input().split()))

	total = 0
	for v, c in zip(vals, costs):
    	resale = v - c
        if resale > 0:
        	total += resale


n = int(input())
vals = list(map(int, input().split()))
costs = list(map(int, input().split()))

if n == 1:
    print(0)
else:
    total = 0
    for v, c in zip(vals, costs):
        resale = v - c
        if resale > 0:
            total += resale
    print(total)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# coding: utf-8
import numpy as np
N = int(input())

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

v2=np.array(v)
c2=np.array(c)

v2[np.argsort(v2)]
c2[np.argsort(c2)]

x = v2[-1] + v2[-2]
y = c2[-1] + c2[-2]
print(x-y)


# coding: utf-8
# Your code here!
V=[]
C=[]

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

li = input().split()

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

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

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

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

print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
for a, b in zip(v,c):
    ans +=max(a-b,0)
ans

n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
for a, b in zip(v,c):
    ans +=max(a-b,0)
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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 += 1
print(count)

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

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)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
a=["0"]
for i in range(n):
    for j in range(n-1):
        if (v[i]+v[j+1])-(c[i]+c[j+1])>0 and v[i]!=v[j+1] and c[i]!=c[j+1]:
            a+=str((v[i]+v[j+1])-(c[i]+c[j+1]))
        elif (v[i]+v[j+1])-(c[i]+c[j+1])<=0:
            print(0)
a=sorted(a,reverse=True)
print(a[0])

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*-coding:utf-8 -*-

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

profits = []
z = 0

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

print(profits)

for i in profits:
    p = profits.pop()
    if p < 0:
        print(z)
        exit()
    else:
        z += p
print(z)

# -*-coding:utf-8 -*-

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

profits = []
z = 0

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

print(profits)

for i in profits:
    p = profits.pop()
    if p <= 0:
        print(z)
        exit()
    else:
        z += p
print(z)

# -*-coding:utf-8 -*-

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

profits = []
z = 0

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

#print(profits)
for i in range(n):
    p = profits.pop()
    #print(p)
    if p <= 0:
        print(z)
        exit()
    else:
        z += p
print(z)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
v = map(int, input().split())
c = map(int, input().split())
ans = 0

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
v = map(int, input().split())
c = map(int, input().split())
max_val = 0
for _v, _c in zip(v, c):
  if _v - _c > 0:
    max_val += _v - _c
print(max_val

n = int(input())
v = map(int, input().split())
c = map(int, input().split())
max_val = 0
for _v, _c in zip(v, c):
  if _v - _c > 0:
    max_val += _v - _c
print(max_val)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
d = 0
for i in range(n):
    if v[i] < c[i]:
        d = d + v[i] - c[i]
print(d)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
cost = [int(c)-int(v) for c,v in zip(input(), input())]
print(sum([c if c>0 else 0 for c in cost]))

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# coding: utf-8
import itertools
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
d = 0
maxd = 0
for m in range(1, n + 1):
    a0 = [list(i) for i in list(itertools.combinations(list(range(n)), m))]
    print(a0)
    for a1 in a0:
        x = sum([v[j] for j in a1])
        y = sum([c[j] for j in a1])
        d = x - y
        if maxd < d:
            maxd = d
print(maxd)


# coding: utf-8
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)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
v = list(map(int, input().split()))
c = list(map(int, input().split()))
ans = 0
for i,j in zip(v,c):
  cospa = i - j
  if cospa > ans:
    ans = cospa
print(ans)
    

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from itertools import combinations

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

idx = range(n)
result = [0, sum(value)-sum(cost)]
index = [idx for idx, v, c in enumerate(zip(value, cost)) if v > c]
comb = [com for i in range(1, len(index)) for com in combinations(index, i)]

for com in comb:
  tmp = 0
  for c in com:
    tmp += value[c]-cost[c]
  result.append(tmp)
    
print(max(result))

n = int(input())
value = list(map(int, input().split()))
cost = list(map(int, input().split()))
result = 0
for v, c in zip(value, cost):
  if v > c:
    result += v-c
print(result)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A,B,T = map(int,input().split())

C = int((T + 1/2)//A)
ans = B*C

print(ans)

# -*- coding: utf-8 -*-


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)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):

import numpy as np
import sys
input = sys.stdin.readline
N = int(input())
V = np.array(list(map(int, input().split())))
C = np.array(list(map(int, input().split())))


v_c_sum=[]
from itertools import combinations
for i in range(N+1):
    for t in combinations(range(N), i):
        print(t)

        v =np.sum(V[list(t)])
        c =np.sum(C[list(t)])
        v_c_sum.append(v-c)
print(max(v_c_sum))


import numpy as np
import sys
input = sys.stdin.readline
N = int(input())
V = np.array(list(map(int, input().split())))
C = np.array(list(map(int, input().split())))


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

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a=input()
p=list(map(int,input().split()))
q=list(map(int,input().split()))
cost=0
for i in range(a):
    if p[i] - q[[i] > 0:
        cost += (p[i]-q[i])   
print(n)

a=int(input())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
cost=0
for i in range(a):
    if p[i] - q[i] > 0:
        cost += (p[i]-q[i])   
print(cost)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
ef resolve():
    n = int(input())
    v = map(int,input().split())
    c = map(int,input().split())
    s = [x-y for x,y in zip(v,c) if (x-y)>0]
    ans = 0
    if s:
        ans = sum(s)
    print(ans)

if __name__ == "__main__":
    resolve()

def resolve():
    n = int(input())
    v = map(int,input().split())
    c = map(int,input().split())
    s = [x-y for x,y in zip(v,c) if (x-y)>0]
    ans = 0
    if s:
        ans = sum(s)
    print(ans)

if __name__ == "__main__":
    resolve()

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = input()
vli = list(map(int,input().split()))
cli = list(map(int,input().split()))
for i in n:
  sli = []
  sli.append(vli[i] - cli[i])
for j in n:
  ans = []
  if sli[j] > 0:
    ans.append(sli[j])
answer = sum(ans)    
print(answer)

n=input()
vli = list(map(int,input().split()))
cli = list(map(int,input().split()))
for i in n:
  sli=[]
  sli.append(vli[i]-cli[i])
for j in n:
  ans=[]
  if sli[j]>0:
    ans.append(sli[j])
print(sum(ans))

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
d=[]
for i in N-1:
  m=v[i]-c[i]
  if m>0:
    d.append(m)
print(sum(d))

N=int(input())
v=list(map(int,input().split()))
c=list(map(int,input().split()))
d=[]
for i in range(N):
  m=v[i]-c[i]
  if m>0:
    d.append(m)
print(sum(d))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
val = []
cos = []
for i in range(N):
    val.append(int(input())
for i in range(N):
    cos.append(int(input())
dif = [val[i]-cos[i] for i in range(N)]
ma = 0
for d in dif:
    ma += d if d >= 0 else 0
return ma

n = int(input())
va = input().split()
co = input().split()

val = [int(v) for v in va]
cos = [int(c) for c in co]

dif = [val[i]-cos[i] for i in range(n)]
ma = 0
for d in dif:
    ma += d if d >= 0 else 0
print(ma)

Verdicts: Runtime Error

Accepted