TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
kusiyaki = int(input())
kushi = []

for i in range(kusiyaki*2):
  kushi.append(int(input()))
  
kushi = sorted(kushi)
print(sum(kushi[0::2]))

kusiyaki = int(input('作りたい串焼きの本数を入力してください：'))
kushi = [None] * kusiyaki * 2
i = 0
sum = 0

for kushi_length in kushi:
  kushi_length = input('串の長さを入力してください：')
  kushi[i] = int(kushi_length)
  i += 1


kushi = sorted(kushi)
kushi_min_length = kushi[0:len(kushi):2]
print(kushi)
print(kushi_min_length)
for length in kushi_min_length:
  sum += int(length)

print(sum)

a = int(input())
b = sorted(map(int,input().split()))
print(sum(b[0::2]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
num = int(input())
num_list = sorted(list(map(int, input().split())))
print(num_list)
i = 0
sum = 0
while i < num * 2:
  sum += num_list[i]
  i += 2
print(sum)

num = input()
num_list = list(map(int, input().split()))sort()
i = 0
sum = 0
while i < num * 2:
  sum += num_list[i]
  i += 2
print(sum)

num = int(input())
num_list = sorted(list(map(int, input().split())))
i = 0
sum = 0
while i < num * 2:
  sum += num_list[i]
  i += 2
print(sum)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

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

L.sort

s = 0

for n in range(N):
    s += L[2*n]
print(s)

N = int(input())
L = list(map(int,input().split())
 
L.sort()
 
s = 0
 
for n in range(N):
    s += L[2*n]
print(s)

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

L.sort()
s = 0

for n in range(N):
    s += L[2*n}

print(s)

N =int( input())
L = list(map(int,input().split())
 
L.sort
 
s = 0
 
for n in range(N):
    s += L[2*n]
print(s)

N = input()
L = list(map(int,input().split())
 
L.sort()
 
s = 0
 
for n in range(N):
    s += L[2*n]
print(s)

N = int(input())
L = list(map(int, input().split()))
 
L.sort()
s = 0
 
for n in range(N):
    s += L[2*n]
 
print(s)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
5
100 1 2 3 14 15 58 58 58 29


n = int(input())
a = list(map(int, input().split()))
a.sort()
res = 0
for i in range(0, 2*n, 2):
  res += min(a[i], a[i+1])

print(res)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N=int(input())
L=list(map(int,input().split()))
L.sort()
S=0
for i in L[::2]:
  S=S+1
print(S)

N=int(input())
L=list(map(int,input().split()))
L.sort()
S=0
for i in L[::2]:
  S=S+i
print(S)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n = int(input())
l = [int(i) for i in input().split()]
a = 0
for i in l:
    if i % 2 == 0:
        a = a + i
print(a)


n = int(input())
l = [int(i) for i in input().split()]
a = 0
for i in range(len(l)):
    if i % 2 == 0:
        a = a + l[i]
print(a)


n = int(input())
l = [int(i) for i in input().split()]
a = 0
for i in len(l):
    if i % 2 == 0:
        a = a + l[i]
print(a)


n = int(input())
l = [int(i) for i in input().split()]
a = 0
l.sort()
for i in range(len(l)):
    if i % 2 == 0:
        a = a + l[i]
print(a)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
def pair(n,count):
    l=[];su=0
    for i in range(0,len(n),2):
        sub=list()
        sub.append(n[i:i+2])
        su=su+sub[0][0]
        l.append(sub)
    return(su)
        

        
ip1=5
ip2=[100,1,2,3,14,15,58 ,58, 58, 29]
ip2.sort()
print(pair(ip2,ip1))


def pair(n,count):
    l=[];su=0
    for i in range(0,len(n),2):
        sub=list()
        sub.append(n[i:i+2])
        su=su+sub[0][0]
        l.append(sub)
    return(su)
        

        
ip1=int(input())
ip2=[]
for i in range(ip1*2):
    ip2.append(int(input()))
ip2.sort()
print(pair(ip2,ip1))

def pair(n,count):
    l=[];su=0
    for i in range(0,len(n),2):
        sub=list()
        sub.append(n[i:i+2])
        su=su+sub[0][0]
        l.append(sub)
    return(su)
        
def ip11(): return int(input())
def ip22(): return [int(_) for _ in input().split()]
        

def main():
    ip1=ip11()
    ip2=ip22()
    ip2.sort()
    print(pair(ip2,ip1))
    return
if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
def bbq():
    n = int(input())
    a = input()
    tmp = a.split()
    l = [int(x) for x in tmp]
    l.sort()
    n = 0
    i = 0
    while(i<n:
        n += l[i]
        i += 2
    print (n)

if __name__ == "__main__":
    bbq()

def bbq():
    n = int(input())
    a = input()
    tmp = a.split()
    l = [int(x) for x in tmp]
    l.sort()
    n = 0
    i = 0
    while(i<len(l)):
        n += l[i]
        i += 2
    print (n)

if __name__ == "__main__":
    bbq()

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N=int(input())
L=list(map(int,input().split()))
L.sort(reverse=True)
print(sum(L[:N]))

N=int(input())
L=list(map(int,input().split()))
L.sort()
print(sum(L[0::2]))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n=int(input())
a=map(int,input().split())
ans=0
for i in range(0,2*n,2):
    ans+=a[i+1]
print(ans)

n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=0
for i in range(0,2*n,2):
    ans+=a[i]
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

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

list_input = sorted(list_input)
sums = 0
for i in range(0,2*N,2):
    sums += min(list_input[i],list_input[i+1])

print(sums)


N = int(raw_input())
list_input = map(int, raw_input().split())

list_input = sorted(list_input)
sums = 0
for i in range(0,2*N,2):
    print(i)
    sums += min(list_input[i],list_input[i+1])
print(sums)

N = input()
list_input = map(int, raw_input().split())

list_input = sorted(list_input)
sums = 0
for i in range(0,2*N,2):
    sums += min(list_input[i],list_input[i+1])

print(sums)

N = input()
list_input = map(int, raw_input().split())

list_input = sorted(list_input)
sums = 0
for i in range(N,2*N):
    sums += list_input[i]

print(sums)

N = int(raw_input())
list_input = sorted(map(int, raw_input().split()))
print(sum(list_input[::2]))

N = int(raw_input())
list_input = map(int, raw_input().split())

list_input = sorted(list_input)
sums = 0
for i in range(0,2*N,2):
    sums += min(list_input[i],list_input[i+1])

print(sums)


N = int(input())
list_input = sorted(map(int, input().split()))
print(sum(list_input[::2]))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n=int(input())
l=[input() for i in range(n)]
l.sort()
s=0
for j in l[::2]:
    s+=j
print(s)

n=int(input())
l=list(map(int,input().split()))
l.sort()
print(sum(l[::2]))

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
num_meals = int(input())
skewers = list(map(int, input().split()))
skewers.sort()
print(skewers)
ingredients = 0
for skewer in range(0,(len(skewers) - 1),+2):
    print(skewers[skewer])
    ingredients = ingredients + skewers[skewer]
print(ingredients)


num_meals = int(input())
skewers = list(map(int, input().split()))
skewers.sort()
ingredients = 0
for skewer in range(0,(len(skewers) - 1),+2):
    ingredients = ingredients + skewers[skewer]
print(ingredients)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N=int(input())
inp=input()
L=[int(val) for val in inp.split()]
L=sorted(L,reverse=True)
total=0
start=0
for _ in range(N):
  total+=min(L[start],L[start+1])
  start+=2
 

N=int(input())
array=input()
L=[int(val) for val in array.split()]
L=sorted(L)
total=0
start=0
P=[L for val in L]
for _ in range(N):
  total+=min(P[start],P[start+1])
  P.pop(start)
  P.pop(start+1)
  start+=2
print(total)

N=int(input())
array=input()
L=[int(val) for val in array.split()]
L=sorted(L,reverse=True)
print(L)
total=0
start=0
for _ in range(N):
  total+=min(L[start],L[start+1])
  #print(L[start])
  #print(L[start]L[start+1])
  start+=2
print(total)

N=int(input())
inp=input()
L=[int(val) for val in inp.split()]
L=sorted(L,reverse=True)
total=0
start=0
for _ in range(N):
  total+=min(L[start],L[start+1])
  start+=2
print(total)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N, X = map(int, intpu().split())
if X <= N / 3:
    result = 3 * (N - X)
if N / 3 < X and X < N /2:
    result = 6 * X
if N / 2 <= X:
    result = 3 * X
print(result)

N = int(input())
L = list(map(int, input().split()))
L.sort()
sum = 0
for i in range(N):
    x = L.pop(0)
    y = L.pop(0)
    sum += x
print(sum)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
num = int(input())
str = input()
Li = list(map(int,str.split(' ')))
Li.sort()
sum = 0 
for i in range(0,num,2):
	sum += Li[i]
print(sum)


num = int(input())
str = input()
Li = list(map(int,str.split(' ')))
Li.sort()
sum = 0 
if len(Li)%2 == 1:
	Li = Li[1:]
for i in range(0,len(Li),2):
	sum += Li[i]
print(sum)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n=int(input())
l=sorted(list(map(int,iput().split()),reverse=True)
print(sum(l[1::2])

n=int(input())
l=sorted(list(map(int,iput().split())),reverse=True)
print(sum(l[1::2])

n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[1::2])

n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[1::2]))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N = int(input())
L = map(int, input().split())
sort(L)
sum = 0
for i in range(0,N):
    sum += L[i*2]
print(sum)

N = int(input())
L = map(int, input().split())
sort(L)
sum = 0
for i in range(0,len(L),2):
    sum += L[i]
print(sum)

N = int(input())
L = map(int, input().split())
sort(L)
sum = 0
for i in range(0,len(L),2):
	sum += L[i]
print(sum)

N = int(input())
L = [int(x) for x in input().split()]
list.sort(L)
sum = 0
for i in range(0,len(L),2):
	sum += L[i]
print(sum)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n = int(input())
a = sorted(list(map(int, input().split())))
s = 0
for i in range(2*n-1):
  s += min(a[i], a[i+1])
print(s)

n = int(input())
a = sorted(map(int, input().split()))
s = 0
for i in range(2n-1):
  s += min(a[i], a[i+1])
print(s)

n = int(input())
a = sorted(list(map(int, input().split())))
s = 0
for i in range(n):
  if i % 2 == 0:
    s += a[i]
print(s)

n = int(input())
a = sorted(list(map(int, input().split())))
s = 0
for i in range(2 * n):
  if i % 2 == 0:
    s += a[i]
print(s)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    a.sort()
    print(sum(a[::2]))

input()
a = [int(i) for i in input().split()]
a.sort()
print(sum(a[::2]))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N=int,input()
data= list(map(int, input().split()))
data.sort()
print(data)
j=0
for i in range(0,len(data),2):
	j+=data[i]
print(j)

N=int(input())
data= list(map(int, input().split()))
data.sort()
j=0
for i in range(0,2*N,2):
	j+=data[i]
print(j)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
def calc(ab1,ab2):
    meat = ab1[0] + ab2[0]
    vege = ab1[1] + ab2[1]
    pattern = fact_list[meat+vege] / (fact_list[meat] * fact_list[vege])
    return pattern
 
 
if __name__ == '__main__':
    N = int(input())
    AB = [list(map(int, input().split())) for i in range(N)]
 
    fact_list = {}
    fact_list[0] = 1
    # max_ab = max(AB[x][0] + AB[x][1] for x in range(N))
    for i in range(1,4001):
        fact_list[i] = (fact_list[i-1] * i) % (10**9 + 7)
 
    sum_count = 0
    for i in range(N):
        for j in range(i+1,N):
            sum_count += calc(AB[i],AB[j])
            sum_count = sum_count % (10**9 + 7)
 
    print( int(sum_count % (10**9 + 7)) )


if __name__ == '__main__':
    N = int(input())
    L = list(map(int, input().split()))
    L = sorted(L)
    
    count = 0;
    for i in range(N):
        count += L[i*2]
    print(count)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
l=set(l)
z=0
for i in range(n):
  z+=l[2*i]
print(z)
       

n=int(input())
l=list(map(int,input().split()))
l=sorted(l)
z=0
for i in range(n):
  z+=l[2*i]
print(z)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
l.sort()
print(l)
ans=sum(l[0::2])
print(ans)

def main():
    n,x=map(int,input().split())
    a,b=n-x,x
    if(a<b):
       a,b=b,a
    path_length = calc_path(a,b,n)
    print(path_length)

def  calc_path(a1,b1,c1):
    q , mod=divmod(a1,b1)
    count=0
    if mod==0:
         c2=c1+2*b1*q-b1
         return c2
    else:
        count=count+1
        c2=c1+2*b1*q
        a2=a1-b1*q
        b2=b1
        if(a2<b2):
           a2,b2=b2,a2
        return calc_path(a2,b2,c2)
if __name__=='__main__':
  main()


def main():
    n,x=map(int,input().split())
    a,b=n-x,x
    if(a<b):
       a,b=b,a
    path_length = calc_path(a,b,n)
    print(path_length)

def  calc_path(a1,b1,c1):
    q , mod=divmod(a1,b1)
    count=0
    if mod==0:
         c2=c1+b1*(q+1)
         return c2
    else:
        count=count+1
        c2=c1+b1*(q+1)
        a2=a1-b1*q
        b2=b1
        if(a2<b2):
           a2,b2=b2,a2
        return calc_path(a2,b2,c2)
if __name__=='__main__':
  main()


n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=sum(l[0::2])
print(ans)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
for i in range(len(b)-1, 0, -2):
    c += min(b[i], b[i-1])



a = int(input())
b = list(map(int, input().split()))
b = sorted(b, reverse=True)
c = 0
for i in range(1, len(b), 2):
    c += min(b[i], b[i-1])
print(c)


Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n,2):
    s += l[i]
print(s)

n = int(input())
l = sorted(list(map(int, input().split())))
s = 0
for i in range(0,n*2,2):
    s += l[i]
print(s)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

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

ans = 0
l.sort()

for i in range(n):
    ans += l[2*i]

print(ans)

n = int(input())
l = list(map(int, input().split()))

ans = 0
l.sort()

for i in range(n):
    ans += l[2*i]
    
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
try:
  k=input()
except EOFError:
  print("wtf")

try:
  li=input()
except EOFError:
  print("wtf2")


li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
print(sum)

k = iinput()
li= input().split()
li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)

k=input()

li=input()

li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)


k = int(input())
li= list(map(int, input().split()))
li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
#!/usr/bin/python3
import sys

sys.setrecursionlimit(100000)

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

def f(a,b):
    if a > b:
        a,b = b,a
    if a==0 or b==0:
        return 0
    if b%a is 0:
        return int(a*(2*(b/a)-1))

    return int(2*a*int(b/a) + f(a,b%a))

print(N+f(N-X, X))


#!/usr/bin/python3
N = int(input())
L = list(map(int, input().split()))

L.sort()

print(sum(L[0::2]))


Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

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

L.sort()
x = 0

for i in range(0, 2*N, 2):
    print(L[i])
    x += L[i]

print(x)



N = int(input())
L = list(map(int, input().split()))
 
L.sort()
x = 0
 
for i in range(0, 2*N, 2):
    x += L[i]
 
print(x)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N = int(input())
L = list(map(int, input().split()))
ans = 0
L.sort()

for i in range(0, 2 * N, 2):
    ans += L[i]
    print(i)
else:
    print(ans)

N = int(input())
L = list(map(int, input().split()))
ans = 0
L.sort()

for i in range(0, 2 * N, 2):
    ans += L[i]
else:
    print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N = int(input())
li = list(map(int, input().split))
li.sort()
P = 0
for i in range(N):
  P += li[i*2]
print(P)

N = int(input())
li = list(map(int, input().split()))
li.sort()
P = 0
for i in range(N):
  P += li[i*2]
print(P)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
input()
print(sum(list(map(int,input().split()))[0:-1:2] ))

input()
print(sum(list(sorted(list(map(int,input().split()))))[0:-1:2] ))


Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N = int(input())
c=list(map(int, input().split()))
c.sort()
Max = 0
for i in range(N):
  K = 2*N
  Max = Max + c[K]
print(Max)
  

N = int(input())
L = list(map(int,input().split()))
L.sort()
maximum = 0
for i in range(N):
  maximum += L[2*i]
print(maximum)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
def main(p1,p2):
    print(p1)
    print(p2)
    L_np = np.sort(np.array(p2))
    x_total = 0
    for i in range(p1):
        x_total += L_np[2*i]
    print(x_total)

if __name__ == "__main__":
    
    N = int(input())
    L = [int(item) for item in input().split()]
    main(N,L)

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

import numpy as np

def main(p1,p2):
    print(p1)
    print(p2)
    L_np = np.sort(np.array(p2))
    x_total = 0
    for i in range(p1):
        x_total += L_np[2*i]
    print(x_total)

if __name__ == "__main__":
    
    N = int(input())
    L = [int(item) for item in input().split()]
    main(N,L)

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

import numpy as np

def main(p1,p2):
    L_np = np.sort(np.array(p2))
    x_total = 0
    for i in range(p1):
        x_total += L_np[2*i]
    print(x_total)

if __name__ == "__main__":
    
    N = int(input())
    L = [int(item) for item in input().split()]
    main(N,L)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n = int(input())
print(sum(sorted(map(int, input()))[::2]))

n = int(input())
print(sum(sorted(list(map(int, input().split())))[::2]))

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
print(sum(l[0::2]))

n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
print(sum(l[1::2]))

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
def f(a,b):
	if a==b:
		return 2*a
	elif a < b:
		return 2*a* + f(a,b-a)
	else:
		return 2*b + f(a-b,b)


N,X = map(int,input().split(" "))

print(N+f(N-X,X))

import bisect

N = input()
Ls = map(int,input().split(" "))
Ls = sorted(Ls)
ans = sum([L for i,L in enumerate(Ls) if i%2 == 0])
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N = int(input())
tmp_lst = input().split()
length_lst = []
print(2*N)
for i in range(2*N):
    print(tmp_lst[i])
    length_lst.append(int(tmp_lst[i]))
length_lst.sort()

output = 0
for i in range(0, 2*N, 2):
    output += length_lst[i]

print(output)


N = int(input())
tmp_lst = input().split()
length_lst = []
#print(2*N)
for i in range(2*N):
#    print(tmp_lst[i])
    length_lst.append(int(tmp_lst[i]))
length_lst.sort()
 
output = 0
for i in range(0, 2*N, 2):
    output += length_lst[i]
 
print(output)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
from fractionsimport gcd
n,x=map(int,input().split())
print(3*(n-gcd(n,x)))


N = int(input())
L = sorted(list(map(int,input().split())))

sum = 0
for i in range(0,2*N,2):
    sum += L[i]
print(sum)


Verdicts: Runtime Error

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
"""A - BBQ Easy"""
import numpy as np
N=int(input())
L=[int(i) for i in input().split()]
result=0
for i in range(0,N,2):
    result+=np.sort(L)[i]
print(result)



import numpy as np
N=int(input())
L=[int(i) for i in input().split()]
result=0
for i in range(0,len(L),2):
    result+=np.sort(L)[i]
print(result)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
n=int(input())
l=list(map(int, input().split()))
s=0
for i in range(0,2*n, 2):
  s+=min(l[i], l[i+1]) 
print(s) 

n=int(input())
l=list(map(int,input().split()))
l.sort()
s=0
for i in range(0,2*n,2):
  s+=min(l[i],l[i+1])
print(s)

Verdicts: Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

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

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]
print(b)

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(get(a,b))

a = int(input())
b = input()

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]
print(b)

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(str(get(a,b)))

a = int(input())
b = input()

b = b.split()
b = [int(x) for x in b]

b = sorted(b)
b = b[::-1]

def get(a,x):
	if a == 0:
		return 0
	x.pop(0)
	add = x.pop(0)

	return add + get((a-1),x)

print(str(get(a,b)))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke is having a barbeque party.  At the party, he will make N servings of _Skewer Meal_.    Example of a serving of Skewer Meal  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i-th skewer is L_i. Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers. Let the length of the shorter skewer be x, then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?

Submission attempts (in order):
N = int(input())
Llist = sorted(list(map(int, input().split())))[::-1]
ans = 0
for i in range(0, 2*N):
    ans += min(Llist[i], Llist[i+1])
print(ans)


N = int(input())
Llist = sorted(list(map(int, input().split())))[::-1]
ans = 0
for i in range(0, 2*N, 2):
    ans += min(Llist[i], Llist[i+1])
print(ans)


Verdicts: Runtime Error

Accepted