TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
import numpy as np
N, M = map(int, input().split())
A_list = np.array(list(map(int, input().split())))

total = np.sum(A_list)
free_day = max(N - M, -1)
print(free_day)

import numpy as np
N, M = map(int, input().split())
A_list = np.array(list(map(int, input().split())))

total = np.sum(A_list)
free_day = max(N - total, -1)
print(free_day)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n, m = map(int, input().split())
A = sum(list(map(int, input(.split()))))
if A <= n:
    print(n-A)
else:
    print(-1)

n, m = map(int, input().split())
A = sum(list(map(int, input().split())))
if A <= n:
    print(n-A)
else:
    print(-1)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n, m = map(int, input().split())
a = 0
for _ in range(m):
  a += int(input())
if a > n: print(-1)
else: print(n-a)

n, m = map(int, input().split())
a = list(map(int, input().split()))
print(max(n-sum(a), -1))


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m = map(int,input().split())
a = list(map(int,input.split()))
A = 0
for i in range(m):
  A += a[i]
if(A<=N):
  print(N-A)
else:
  print(-1)


n,m = map(int,input().split())
a = list(map(int,input()))
A = 0
for i in range(m):
  A += a[i]
if(A<=N):
  print(N-A)
else:
  print(-1)

n,m = map(int,input().split())
a = list(map(int,input().split()))
A = 0
for i in range(m):
  A += a[i]
k = n-A
if(k>=0):
  print(k)
else:
  print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
a,b=map(int,input().split())

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

print(a-sum(c) if a>=sum(c) else '-1')

a,b=map(int,input().split())
 
c=[int(i) for i in input().split()]
d=sum(c)
print(a-sum(c) if a>=sum(c) else '-1')

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n, m = map(int, input().split())

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

if n > sum(a):
    print(-1)
else:
    print(n - sum(a))


n, m = map(int, input().split())

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

if n < sum(a):
    print(-1)
else:
    print(n - sum(a))


Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m=map(int,input().split())
a=[int(b) for b in input().split()]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)


n,m=map(int,input().split())
a=[b for b in int(input().split())]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))

n,m=map(int,input().split())
a=[int(b) for b in input()]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))

n,m=map(int,input().split())
a=[int(b) for b in input().split()]
def func(n,a):
    if n< sum(a):return "-1"
    else: 
        return n-sum(a)
print(func(n,a))

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N=int(input())
M=int(input())
array = list(map(int, input().strip().split()))
if(N>=sum(array)):
    print(N-sum(array))
else:
    print('-1')

N, M = map(int, input().split())
a = list(map(int, input().split()))
if(N>=sum(a)):
    print(N-sum(a))
else:
    print('-1')

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m = map(int,input().split())
a = [0 for i in range(m)]

res = n - sum(a)
if(res <= 0):
  res = -1
print(res)

n,m = map(int,input().split())
a = list(map(int, input().strip().split()))

res = n - sum(a)
if(res < 0):
  res = -1
print(res)



Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m＝ map(int,input().split())
L=list(map(int,input().split()))
print(n-sum(L) if n-sum(L)>=0 else -1)


n=list(map(int,input().split()))
L=list(map(int,input().split()))
print(n[0]-sum(L) if n[0]-sum(L)>=0 else "-1")

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n, m = map(int, input().split())
li = input().split()
b = 0
for a in li:
    b = b + a
if n >= b:
    print(n-b)
else:
    print("-1")

n, m = map(int, input().split())
li = input().split()
b = 0
for a in li:
    b = b + int(a)
if n >= b:
    print(n-b)
else:
    print("-1")

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n=int(input().split()[1])
f=n-sum(map(int,input().split()))
print(-1 if f<0 else f)

n,m=map(int,input().split())
f=n-sum(map(int,input().split()))
print(-1 if f<0 else f)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,m = input().split()
M = int(m)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N - sum(L1)
print(ans)

N,m = input().split()
M = int(m)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N - sum(L1)
print(ans)

n,m = input().split()
N = int(n)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N-sum(L1)
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m=map(int,input().split())
a=sum(list(map(int,input().split())))
if n-a<=0:
    print(n-a)
else:
    print(-1)

n,m=map(int,input().split())
a=list(map(int,input().split()))
print(n-sum(a) if n-sum(a)<0 else -1)

n=int(input())
m=int(input())
a=list(map(int,input().split()))
print(n-sum(a))

n,m=map(int,input().split())
a=sum(list(map(int,input().split())))
if n-a>=0:
    print(n-a)
else:
    print(-1)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N=input()
N=int(N)
M=input()
M=int(M)

sum=0
for num in range(M):
	a=input()
	a=int(a)
	sum=sum+a
	
nokori=N-sum	
if nokori>=0:
	print(nokori)
	
else:
	print(-1)

N,M=input().split()
N=int(N)
M=int(M)

sum=0
a=list(map(int,input().split()))
for num in range(M):
	sum=sum+a[num]
	
nokori=N-sum	
if nokori>=0:
	print(nokori)
	
else:
	print(-1)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = map(int,input().split()) 
A = [list(map(int,input().split())) for i in range(M)]

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)


N, M = map(int,input().split()) 
P = [list(map(int,input().split())) for i in range(M)]

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)

N, M = map(int, input().split())
A = [input().split() for i in range(M)]

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)

N, M = map(int, input().split())
A = [list(map(int,input().split())) for i in range(M)]

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)


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

w = sum(A)

r = N-w

if r<0:
  print(-1)
else:
  print(r)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
def actual(n, m, a_list):
    a_sum = sum(a_list)

    if n >= a_sum:
        return n - a_sum

    return -1

N, M = map(int, input().split())
a_list = map(int, input().split())

print(actual(n, m, a_list))

def actual(n, m, a_list):
    a_sum = sum(a_list)

    if n >= a_sum:
        return n - a_sum

    return -1

n, m = map(int, input().split())
a_list = map(int, input().split())

print(actual(n, m, a_list))


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = map(int,input().split()))
l = list(map(int,input().split()))
su = l.sum()
if N < su:
    print(-1)
else:
    print(N - su)

N, M = map(int,input().split())
l = list(map(int,input().split()))
su = sum(l) + 1
if N < su:
    print('-1')
else:
    print(N - su) 

N, M = map(int,input().split())
l = list(map(int,input().split()))
su = sum(l) + 1
if N < su:
    print(-1)
else:
    print(N - su)

N, M = map(int,input().split())
l = list(map(int,input().split()))
su = sum(l)
if N < su:
    print('-1')
else:
    print(N - su)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N = int(input())
M = int(input())
list =[]
homework = 0

for A in range(0, M):
    list.append(int(input()))
    homework = homework + list[A]

play = N - homework

if play < 0:
    print(-1)
else:
    print(play)

N, M = map(int, input().split())
a = list(map(int, input().split()))
homework = 0

for i in range(M):
    homework += a[i]

play = N - homework

if play < 0:
    print(-1)
else:
    print(play)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

if sum(a) > n:
  print(-1)
else:
  print(sum(a) - n)

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

if sum(a) > n:
  print(-1)
else:
  print(n - sum(a))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M = map(int,input().split())
a = [int(input()) for i in range(M)]
for i in range(M):
  N -= a[i]
print(N if N>0 else -1)

N,M = map(int,input().split())
a = [int(input()) for i in range(M)]
for i in range(M):
  N = N - a[i]
print(N if N>0 else -1)


N,M = map(int,input().split())
a = list(map(int, input().split()))
for i in range(M+1):
  N -= a[i]
print(N if N>0 else '-1')


N,M = map(int,input().split())
a = list(map(int, input().split()))
for i in range(M):
  N -= a[i]
print(N if N>=0 else '-1')


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
k=input()

list_a=k.split()

n=list_a[0]

int(n)

m=list_a[1]

int(m)

t=input()

list_b=t.split()

h=len(list_b)

list_s=[int(s) for s in list_b]

if m==h and sum(list_s)>=n:
  print(sum(list_s)-n)
elif m==h and sum(list_s)<n:
  print("-1")

k=input()

list_a=k.split()

n=list_a[0]

int(n)

m=list_a[1]

int(m)

t=input()

list_b=t.split()

h=len(list_b)

int(h)

list_s=[int(s) for s in list_b]

if m==h and sum(list_s) <= n:
  print(n-sum(list_s))
elif m==h and sum(list_s) > n:
  print("-1")

k=input()

list_a=k.split()

n=list_a[0]

m=list_a[1]

t=input()

list_b=t.split()

h=len(list_b)

list_s=[int(s) for s in list_b]

if int(m)==int(h) and sum(list_s) <= int(n):
  print(int(n)-sum(list_s))
elif int(m)==int(h) and sum(list_s) > int(n):
  print("-1")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

print(works)
plays = n - sum(works)
print(plays if plays >= 0 else -1)

n, m = map(int, input().split())
works = list(map(int, input().split()))

plays = n - sum(works)
print(plays if plays >= 0 else -1)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

for i in range(m):
  n -= A(i)
  
if n < 0:
  print(-1)
else:
  print(n)

n,m = map(int, input().split())
A = list(map(int,input().split()))

hw_days = 0

for i in len(A):
  hw_days += A(i)

vacation = n - hw_days

if vacation < 0:
  print(-1)
else:
  print(vacation)

n,m = map(int,input().split())
A = list(map(int,input().split()))
 
for i in range(m):
  n -= A(i)
  
if n < 0:
  print(-1)
else:
  print(n)

n,m = map(int,input().split())
A = list(map(int,input().split()))
 
for i in range(m):
  n -= A[i]
  
if n < 0:
  print(-1)
else:
  print(n)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M
A = sum([int(x) for x in input().split()])
if N - M < 0:
  print(-1)
else:
  print(N-M)

N, M = map(int, input().split())
A = sum([int(x) for x in input().split()])
if N - M < 0:
  print(-1)
else:
  print(N-M)

N, M = map(int, input().split())
A = sum([int(x) for x in input().split()])
if N - A < 0:
  print(-1)
else:
  print(N-A)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M =map(int,input().split())
a =list( map(int,input().split()) )
if sum(a)-N >=0:
    print(sum(a)-N)
else :
    print('-1')  

N,M =map(int,input().split())
a =list( map(int,input().split()) )
if N-sum(a) >=0:
    print(N-sum(a))
else :
    print(-1)    

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m = map(int,input().split())
li=list(map(int,input().split()))
g=n-sum(li)
if g>=0:
    print g
else:
    print -1

n,m = map(int,input().split())
li=list(map(int,input().split()))
g=n-sum(li)
if g>=0:
  return g
else:
  return -1

n,m = map(int,input().split())
li=list(map(int,input().split()))
g=n-sum(li)
if g>=0:
    print(g)
else:
    print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
import math
# i=int(input())
#n,m=map(int, input().split())
r = int(input())
print(r*2*math.pi)


n, m = map(int, input().split())
a = list(map(int, input().split()))
print(-1 if n-sum(a) < 0 else n-sum(a))


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = map(int, input().split())
A = [int(i) for i in input().split()]

if sum(A)>N:
    print(-1)
else:
    print(sum(A)-N)

N, M = map(int, input().split())
A = [int(i) for i in input().split()]

if sum(A)>N:
    print(-1)
else:
    print(N-sum(A))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = 0

for i in A:
    sum += i

if sum > N:
    print(-1)
else:
    print(n - sum)    

n,m = map(int,input().split())
A = list(map(int, input().split()))
 
a = sum(A)
 
ans = n-a
if ans < 0:
    ans = -1
 
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = [map(int, input(.split()))]

works = [map(int, input().split())]

ans = N

for i in range(M):
    ans -= works[i]

if ans < 0:
    print('-1')
else:
    print(ans)

N, M = map(int, input().split())
works = list(map(int,input().split()))

if N >= sum(works):
  print(N - sum(works))
else:
  print("-1")

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
from sys import stdin
 
r = int(stdin.readline().rstrip())
print(r*2*3.1415)

from sys import stdin

holiday_count, task_count = stdin.readline().rstrip().split()
holiday_count = int(holiday_count)
tasks_days = sum([int(x) for x in stdin.readline().rstrip().split()])

remain = holiday_count - tasks_days
if remain < 0:
  print(-1)
else:
  print(remain)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = sum(A)-N
if = sum(A)-N >= 0:
  print(ans)
else:
  print('-1')
  

N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = N-sum(A)
if = N-sum(A) >= 0:
  print(ans)
else:
  print('-1')

N,M = map(int,input().split())
A = sorted(map(int, input().split()))
ans = N-sum(A)
if N-sum(A) >= 0:
  print(ans)
else:
  print('-1')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M=map(int,input().split())
lists0=list(map(int,input().split()))
lists1=lists0[0:M-1]
SUM=sum(lists1)
X=N-SUM
if X>=0:print(X)
else:print("-1")

N,M=map(int,input().split())
lists0=list(map(int,input().split()))
lists1=lists0[0:M-1]
SUM=sum(lists0)
X=N-SUM
if X>=0:print(X)
else:print(-1)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = map(int, input().split())
A = list(map(int,input(),split()))
a = sum(A)

if N >= a:
  print(int(N-a))
if N < a:
  print(-1)

N, M = map(int, input().split())
A = list(map(int,input().split()))
a = sum(A)
 
if N >= a:
  print(int(N-a))
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m=map(int,input().split())

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

if n-a> 0:
  print(n-a)
  
else:
  print(-1)

n,m=map(int,input().split())
 
a=list(map(int,input().split()))
s=int(sum(a))
 
if (n-s)>= 0:
  print(n-s)
  
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m = map(int,input().split())

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

total = 0

for i in range m:
    total += c[i]

if((n-total) >= 0):
    print(n-total)
else:
    print(-1)

n,m = map(int,input().split( ))

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


total = 0

for i in range(m):
    total += c[i]

if((n-total) >= 0):
    print(n-total)
else:
    print(-1)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - conter>=0:
    print(N-counter)
else:
    priont("-1")

N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - conter>=0:
    print(N-counter)
else:
    print("-1")

N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - conter>=0:
    print(N-counter)
else:
    print(-1)

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

for i in range(M):
    counter += A[i]
    
print(N-counter)


N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - counter>=0:
    print(N-counter)
else:
    print(-1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

s = sum(A)

print( max(N - A, -1) )

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
s = sum(A)
 
print( max(N - A, -1) )

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
s = sum(A)
 
print( max(N - s, -1) )

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
summer_vacation, amount_of_homework = map(int, input().split())
a = map(int, input().split())
homework_list = list[a]

total_days = 0

for i in homework_list:
    total_days += i

if summer_vacation >= total_days:
    print(summer_vacation - total_days)
else:
    print(-1)


summer_vacation, amount_of_homework = map(int, input().split())
a = map(int, input().split())
homework_list = list(a)

total_days = 0

for i in homework_list:
    total_days += i

if summer_vacation >= total_days:
    print(summer_vacation - total_days)
else:
    print(-1)


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M=list(map(int, input().split()))
A=list(map(int, input().split()))
ans=sum(A)
if N<ans:
    print('-1')
else:
    print(M-ans)

N,M=map(int,input().split())
A=list(map(int,input().split()))
sumA=sum(A)
if N<sumA:
    print(N-sumA)
else:
    print('-1')

N,M=map(int,input().split())
A=list(map(int,input().split()))
if N<sum(A):
    print('-1')
else:
    print(N-sum(A))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M = map(int,input().split())

list = [map(int,input().split())]

if count(list) > N:
  print(-1)
else:
  print(N-count(list))

N,M = map(int,input().split())
A = [map(int,input().split())]
print(max(-1,N-sum(A)))

N,M = map(int,input().split())
A = list(map(int,input().split()))
print(max(-1,N-sum(A)))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M = map(int,input().split())
ans = 0
for i in range(M):
  A = int(input())
  N -= M
if N >= 0:
  print(N)
else:
  print("-1")

N,M = map(int,input().split())
A = list(map(int,input().split()))
ans = N - sum(A)
if ans >= 0:
  print(ans)
else:
  print("-1")

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

if(sum(a)>m):
	print(-1)
else:
	val=n-sum(a)
	print(val)

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

if(sum(a)<n):
	print(-1)
else:
	val=n-sum(a)
	print(val)

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

if(sum(a)>n):
	print(-1)
else:
	val=n-sum(a)
	print(val)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

sum = sum(s_)
res = n - sum

if(res < 0):
    print(-1)
else:
    print(res)


n,m = map(int,input().split())
a_ = list(map(int,input().split()))

sum = sum(a_)
res = n - sum

if(res < 0):
    print(-1)
else:
    print(res)


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
x,y = map(int, input().spilit())
array = list(map(int, input().spilit()))
su = sum(array)
a = x - su
if a > -1:
	print(a)
else:
	print(-1)

x,y = map(int, input().spilit())
array = list(map(int, input().spilit()))
su = sum(array)
a = x - su
if a > -1:
  print(a)
else:
  print(-1)

x, y = map(int, input().spilit())
array = list(map(int, input().spilit()))
su = sum(array)
a = x - su
if a > -1:
    print(a)
else:
    print(-1)

x, y = map(int, input().split())
array = list(map(int, input().split()))
su = sum(array)
a = x - su
if a > -1:
    print(a)
else:
    print(-1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
total = 0
for i in a:
  total += a
if n < total:
  print(-1)
else:
  print(n - total)


n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
total = 0
for i in a:
  total += i
if n < total:
  print(-1)
else:
  print(n - total)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N, M = map(int, input().split())
A = map(int, input().split())

ans1 = sum(A)
ans2 = N - ans1

if sns2 < 0:
    print(-1)
else:
    print(ans2)


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

ans = N - sum(A)

if ans < 0:
    print(-1)
else:
    print(ans)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N,M=map(int,input().split())
L=list(map(int,input().split()))
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)

,M=map(int,input().split())
L=list(map(int,input().split()))
for i in range(M):
  X=X+L[i]
if N-X<0:
  print(-1)
else:
  print(N-X)

N,M=map(int,input().split())
L=list(map(int,input().split()))
X=sum(L)
if N-X<0:
  print(-1)
else:
  print(N-X)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m=map(int,input().split())
for num	in input().split():
  n-=num
print(n if n>=0 else -1)

n,m=map(int,input().split())
for num	in input().split():
  n-=int(num)
print(n if n>=0 else -1)


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
a = input()
b = input()

days,home = [int(i) for i in a.split(" ")]
cost = [int(n) for n in b.split(" ")]
print(days,home)
print(cost)

validdate = int(days) - sum(cost)
if validdate >= 0:
    print(validdate)
else:
    print(-1)

a = input()
b = input()

days,home = [int(i) for i in a.split(" ")]
cost = [int(n) for n in b.split(" ")]
#print(days,home)
#print(cost)

validdate = int(days) - sum(cost)
if validdate >= 0:
    print(validdate)
else:
    print(-1)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
n,m = map(int,input())
ai = list(map(int,input().split()))
sumday = sum(ai)
if n-sumday<0:
  print(-1)
else:
  print(n-sumday)

n,m = map(int,input().split())
ai = list(map(int,input().split()))
sumday = sum(ai)
if n-sumday<0:
  print(-1)
else:
  print(n-sumday)


Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

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

ans = 0
for i in range(0,M):
  ans = ans + l[i]
  
if(ans > N):
  print("-1")
else:
  print(N-ans)  

N,Q = map(int, input().split())
l = list(map(int,input().split()))
 
ans = 0
for i in range(0,Q):
  ans = ans + l[i]
  
if(ans > N):
  print("-1")
else:
  print(N-ans)  

Verdicts: Runtime Error

Accepted
Problem: Takahashi has N days of summer vacation.  His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.  He cannot do multiple assignments on the same day, or hang out on a day he does an assignment.  What is the maximum number of days Takahashi can hang out during the vacation if he finishes all the assignments during this vacation?  If Takahashi cannot finish all the assignments during the vacation, print `-1` instead.

Submission attempts (in order):
N = map(int, input().split())[0]
A = map(int, input().split())
sum = 0
for i in A:
  sum += A
if sum > N:
  print(-1)
else:
  print(N-sum)

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

sum = 0
for i in A:
  sum = sum + i
if sum > N:
  print(-1)
else:
  print(N-sum)

Verdicts: Runtime Error

Accepted