Problem:
 Score : 200 points    Problem Statement 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?      Constraints  1≦N≦100  1≦L_i≦100  For each i , L_i is an integer.         Input The input is given from Standard Input in the following format:  N  L_1  L_2  ...  L_{2N}       Output Print the maximum total number of ingredients that Snuke's N servings of Skewer Meal can hold.        Sample Input 1 2
1 3 1 2      Sample Output 1 3  If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold 1 and 2 ingredients, for the total of 3 .       Sample Input 2 5
100 1 2 3 14 15 58 58 58 29      Sample Output 2 135

Solution (Python):
k = raw_input()
n = raw_input()
a = [int(i) for i in n.split()]
a.sort()

sum1 = 0
for i in range(int(k)):
    sum1 += min(a[2*i], a[2*i+1])
print sum1

Solution (Python):
N = input()
L = sorted(map(int, raw_input().split()))[::-1]

print sum(l for i, l in enumerate(L) if i % 2 != 0)

Solution (Python):
m=0
n=int(input())
kushi= list(map(int,input().split()))
kushi.sort()

if len(kushi) %2==1:
	del kushi[-1]

for i in range(0,len(kushi)-1,2):
	if kushi[i]>kushi[i+1]:
		m+=kushi[i+1]
	else:
		m+=kushi[i]
print(m)

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

L.sort()

for x in range(0, 2 * N - 1, 2):
    BBQ.append(min(L[x], L[x + 1]))

print(sum(BBQ))

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

Solution (Python):
n = input()
l = raw_input()
l = sorted(map(int, l.split()))
res = 0
for i in xrange(n):
    res += min(l[2 * i], l[2 * i + 1])
print res

Solution (Python):



N = int(input())*2
s_L = input()
L = []
for i in s_L.split():
    L.append(int(i))

L.sort()

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

print(ans)

Solution (Python):
N = int(input())
Ls = map(int, input().split())
Ls = sorted(Ls)
ans = sum(Ls[2*i] for i in range(N))
print(ans)

Solution (Python):
N = int(raw_input())
L = raw_input()
L = map(int, L.split(" "))
r = 0
L.sort()
L.reverse()
for i in xrange(N):
    r += L[i * 2 + 1]
print r

Solution (Python):


N = int(input())
Ls = list(map(int, input().split()))
sorted_ = sorted(Ls)
list_ = []
for i, x in enumerate(sorted_):
    if i % 2 == 0:
        list_.append(x)
sum_ = sum(list_)
print(sum_)

Solution (Python):
n = int(raw_input())
a = map(int, raw_input().split())
a.sort()
print sum(a[::2])

Solution (Python):
N=raw_input()
up=raw_input()
up=up.split()

up=map(int,up)
up.sort()
count=0
for i in range(int(N)):
    count+=up[i*2]
print count

Solution (Python):
N = int(raw_input())
length_list = sorted(map(int, raw_input().strip().split()))

total = 0
for i in xrange(0, 2*N, 2):
    total += length_list[i]
print total

Solution (Python):



def main():
    n = int(input())
    l = [int(i) for i in input().split()]
    sorted_l = sorted(l)

    counter = 0
    for i in range(n):
        counter += sorted_l[i * 2]
    print(counter)

if __name__ == '__main__':
    main()

Solution (Python):


def main():
    n = int(input())
    l = list(map(int, input().split()))
    l.sort(reverse=True)
    m = 0

    for i in range(0, len(l), 2):
        m += min(l[i], l[i+1])

    print(m)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L = sorted(L)
num=0
for i in range(0,len(L),2):
    num = num + L[i]
print(num)

Solution (Python):
n = int(raw_input())
ls = map(int, raw_input().split())
ls.sort()
cnt = 0
for i in range(0, 2 * n, 2):
    cnt += ls[i]
print cnt

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
rst = []
for i in range(0, len(L), 2):
    rst.append(min(L[i], L[i+1]))
print(sum(rst))

Solution (Python):
N = int(input())
L = list(int(_) for _ in input().split())

L.sort()

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

print (s)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
Ans = 0

for row in range(N):
    Ans = Ans + L[(2*row)-1]

print(Ans)

Solution (Python):
import numpy as np

N = int(raw_input())
data = np.array(map(int, raw_input().split()))
data = np.sort(data)
idx = np.array([True, False]*N)

ans = sum(data[idx])

print(ans)

Solution (Python):
n = int(input().strip())
L = map(int,input().strip().split(" "))
ret = 0
flag = 0
for i in sorted(L,reverse = True):
    if flag == 0:
        flag = 1
        continue
    ret = ret + i
    flag = 0

print(ret)

Solution (Python):
n = input()
l = map(int, raw_input().split())

l.sort()

s = 0

for i in range(len(l)):
	if i % 2 == 0:
		s += l[i]

print s

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
sort_L = sorted(L)
ans = 0
for i in range(N):
    ans = ans + sort_L[2*i]
print('%s' % str(ans))

Solution (Python):
N = input()
l = map(int, raw_input().split())
l.sort()
s = 0
for i in xrange(N):
    s += min(l[i*2], l[i*2+1])
print s

Solution (Python):
num = int(raw_input())
rods = [ int(x) for x in raw_input().split() ]

rods = sorted(rods)
ret = 0
for index in xrange(num):
    n = min(rods[2 * index], rods[2 * index+1])
    ret += n

print ret

Solution (Python):

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)

Solution (Python):
import sys
n = int(raw_input())
arr = map(int,raw_input().strip().split(" "))
arr.sort()
arr.reverse()
cnt =0
c=1
for i in range(0,n):
    cnt+=arr[c]
    c+=2
print cnt

Solution (Python):
n = raw_input()

a = map(int, raw_input().split())
a.sort()

ans = 0

for x in a[::2]:
	ans += x

print ans

Solution (Python):


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

Solution (Python):
N = int(input())
A = sorted(map(int, input().split()))
ans = sum(A[i * 2] for i in range(N))
print(ans)

Solution (Python):
ans = 0
n = input()
a = map(int, raw_input().split())
a.sort()
for i in xrange(2 * n):
  if i % 2 == 0:
    ans += a[i]
print ans

Solution (Python):
n = input()
ls = map(int, raw_input().split())
ls.sort()

print sum(ls[::2])

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

l=map(int,raw_input().split())
l.sort()
ans=chk=0
for i in l[::-1]:
    if chk%2:
        ans+=i
    chk+=1
print ans

Solution (Python):
_ = int(input())
print(sum(sorted([int(x) for x in input().split()])[::2]))

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

sLs = sorted(Ls)

ans = 0
for i in range(N):
    ans += sLs[i*2]

print(ans)

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

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

Solution (Python):
_=input();print(sum(sorted([int(i) for i in input().split()])[::2]))

Solution (Python):
n = input()
l = map(int,raw_input().split())
l.sort()
ans = 0
for i in range(n):
    a = l.pop(0)
    b = l.pop(0)
    ans += min(a,b)
print ans

Solution (Python):
import sys

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

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

l.sort()
ans = 0

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

print(ans)

Solution (Python):
n = int(raw_input())
values = sorted(map(int, raw_input().split()))
result = 0
for i in range(0, 2 * n, 2):
  result += values[i]
print(result)

Solution (Python):
N = input()
kushi = map(int,raw_input().split())
kushi.sort()
answer = 0
for i in xrange(N):
	answer += kushi[2 * i]
print answer

Solution (Python):



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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()

ans = 0
for k in range(N):
    ans += min(L[k*2],L[k*2+1])

print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
ans=0
for i in range(0,n*2,2):
    ans += min(b[i],b[i+1])
print(ans)

Solution (Python):
N = int(input())
L = [int(t) for t in input().split(' ')]

L.sort()

print(sum([n for i, n in enumerate(L) if i & 1 == 0]))

Solution (Python):
N = raw_input()
l = [int(x) for x in raw_input().split(' ')]
l.sort()
ret = 0
for i in xrange(0, len(l) / 2):
  ret += l[i * 2]
print ret

Solution (Python):
n = int(raw_input())
l = map(int, raw_input().split())

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

print ans

Solution (Python):

N = int(raw_input())
L = sorted(map(int, raw_input().split()))
print sum([L[i*2] for i in xrange(N)])

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

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

Solution (Python):
input()
print sum(sorted(map(int, raw_input().split()))[::2])

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

L.sort()

ans = 0
for i in range(n):
	now = 2 * i
	ans += L[now]

print(ans)

Solution (Python):

def f(xs, ys):
    acc = 0
    for x, y in zip(xs, ys):
        acc += min(x, y)
    return acc
n = int(input())
l = sorted(map(int,input().split()))
ans = max(f(l[0::2], l[1::2]), f(l[1::2], l[2::2]))
print(ans)

Solution (Python):
N = int(raw_input())
L = map(int,raw_input().split())
L.sort(reverse = True)
ans = 0
for i in xrange(N):
	ans += min(L[2*i],L[2*i+1])
print ans

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

Solution (Python):
raw_input()
print sum(sorted(map(int, raw_input().split()))[0::2])

Solution (Python):
n=input()
l=map(int,raw_input().split())
l.sort()
cnt=0
for i in xrange(n):
    cnt+=l[i*2]
print(cnt)

Solution (Python):

import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N = int(raw_input())
L = map(int, raw_input().split())
L.sort()
ans = 0
for i in xrange(N - 1, -1, -1):
    ans += min(L[2*i], L[2*i + 1])
print ans

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
A.sort()
print(sum(A[::2]))

Solution (Python):
input()
print sum(sorted(map(int, raw_input().split()))[::2])

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for l1, l2 in zip(L[::2], L[1::2]):
    ans += l1
print(ans)