node_ids
sequencelengths 4
1.4k
| edge_index
sequencelengths 1
2.22k
| text
sequencelengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13
] | [
[
48,
2
],
[
57,
8
],
[
45,
20
],
[
58,
23
],
[
54,
25
],
[
29,
28
],
[
49,
34
],
[
51,
37
],
[
46,
39
],
[
58,
39
],
[
28,
40
],
[
52,
43
],
[
55,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
]
] | [
"a = int(input())\nb = list(map(int,input().split()))\nb = sorted(b)\nc = 0\nfor i in range(0,2*a,2):\n c += b[i]\nprint(c)",
"a = int(input())",
"a",
"int(input())",
"int",
"input()",
"input",
"b = list(map(int,input().split()))",
"b",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"b = sorted(b)",
"b",
"sorted(b)",
"sorted",
"b",
"c = 0",
"c",
"0",
"for i in range(0,2*a,2):\n c += b[i]",
"i",
"range(0,2*a,2)",
"range",
"0",
"2*a",
"2",
"a",
"2",
"c += b[i]",
"c",
"b[i]",
"b",
"i",
"print(c)",
"print",
"c",
"b = sorted(b)",
"sorted(b)",
"b",
"a = int(input())",
"int(input())",
"a",
"c += b[i]",
"b[i]",
"c",
"c = 0",
"0",
"c",
"b = list(map(int,input().split()))",
"list(map(int,input().split()))",
"b"
] | a = int(input())
b = list(map(int,input().split()))
b = sorted(b)
c = 0
for i in range(0,2*a,2):
c += b[i]
print(c) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
13,
13
] | [
[
36,
2
],
[
10,
9
],
[
9,
18
],
[
39,
20
],
[
40,
24
],
[
40,
31
],
[
36,
37
],
[
39,
40
]
] | [
"N = int(input())\nL = [int(i) for i in input().split()]\n\nL.sort()\nprint(sum(L[0::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L = [int(i) for i in input().split()]",
"L",
"[int(i) for i in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"print(sum(L[0::2]))",
"print",
"sum(L[0::2])",
"sum",
"L[0::2]",
"L",
"0::2",
"0",
"2",
"N = int(input())",
"int(input())",
"N",
"L = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"L"
] | N = int(input())
L = [int(i) for i in input().split()]
L.sort()
print(sum(L[0::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
48,
2
],
[
45,
8
],
[
42,
22
],
[
26,
25
],
[
49,
31
],
[
51,
34
],
[
46,
36
],
[
25,
37
],
[
52,
40
],
[
43,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"N=int(input())\nL=sorted(list(map(int,input().split())))\nans=0\nfor i in range(0,2*N,2):\n ans+=L[i]\nprint(ans)",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L=sorted(list(map(int,input().split())))",
"L",
"sorted(list(map(int,input().split())))",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans=0",
"ans",
"0",
"for i in range(0,2*N,2):\n ans+=L[i]",
"i",
"range(0,2*N,2)",
"range",
"0",
"2*N",
"2",
"N",
"2",
"ans+=L[i]",
"ans",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"ans=0",
"0",
"ans",
"L=sorted(list(map(int,input().split())))",
"sorted(list(map(int,input().split())))",
"L",
"N=int(input())",
"int(input())",
"N",
"ans+=L[i]",
"L[i]",
"ans"
] | N=int(input())
L=sorted(list(map(int,input().split())))
ans=0
for i in range(0,2*N,2):
ans+=L[i]
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
18,
13,
39,
17,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
35,
2
],
[
38,
8
],
[
39,
21
],
[
41,
24
],
[
39,
26
],
[
42,
33
],
[
39,
33
],
[
35,
36
],
[
38,
39
],
[
41,
42
]
] | [
"N = int(input())\nA = list(map(int, input().split()))\n\nA.sort()\nA = A[::2]\nprint(sum(A))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"A = list(map(int, input().split()))",
"A",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A.sort()",
"A.sort",
"A",
"sort",
"A = A[::2]",
"A",
"A[::2]",
"A",
"::2",
"2",
"print(sum(A))",
"print",
"sum(A)",
"sum",
"A",
"N = int(input())",
"int(input())",
"N",
"A = list(map(int, input().split()))",
"list(map(int, input().split()))",
"A",
"A = A[::2]",
"A[::2]",
"A"
] | N = int(input())
A = list(map(int, input().split()))
A.sort()
A = A[::2]
print(sum(A)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
18,
13
] | [
[
42,
2
],
[
48,
8
],
[
49,
21
],
[
45,
24
],
[
28,
27
],
[
43,
30
],
[
51,
32
],
[
49,
34
],
[
27,
37
],
[
52,
40
],
[
46,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"N = int(input())\nL = list(map(int,input().split()))\nL.sort()\nout = 0\nfor i in range(N):\n out += L[2*i]\nprint(out)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"out = 0",
"out",
"0",
"for i in range(N):\n out += L[2*i]",
"i",
"range(N)",
"range",
"N",
"out += L[2*i]",
"out",
"L[2*i]",
"L",
"2*i",
"2",
"i",
"print(out)",
"print",
"out",
"N = int(input())",
"int(input())",
"N",
"out = 0",
"0",
"out",
"L = list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"out += L[2*i]",
"L[2*i]",
"out"
] | N = int(input())
L = list(map(int,input().split()))
L.sort()
out = 0
for i in range(N):
out += L[2*i]
print(out) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
12,
13,
23,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
60,
2
],
[
10,
9
],
[
9,
18
],
[
57,
20
],
[
26,
25
],
[
63,
30
],
[
34,
33
],
[
58,
39
],
[
66,
42
],
[
58,
46
],
[
33,
47
],
[
58,
49
],
[
33,
51
],
[
67,
55
],
[
64,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
],
[
66,
67
]
] | [
"N=int(input()) \nL = sorted([int(i) for i in input().split()], key=lambda x: x)\n\nfoodCount = 0\nfor i in range(0,len(L), 2):\n foodCount += min(L[i], L[i+1])\n\nprint(foodCount)",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L = sorted([int(i) for i in input().split()], key=lambda x: x)",
"L",
"sorted([int(i) for i in input().split()], key=lambda x: x)",
"sorted",
"[int(i) for i in input().split()]",
"key=lambda x: x",
"key",
"lambda x: x",
"x",
"x",
"foodCount = 0",
"foodCount",
"0",
"for i in range(0,len(L), 2):\n foodCount += min(L[i], L[i+1])",
"i",
"range(0,len(L), 2)",
"range",
"0",
"len(L)",
"len",
"L",
"2",
"foodCount += min(L[i], L[i+1])",
"foodCount",
"min(L[i], L[i+1])",
"min",
"L[i]",
"L",
"i",
"L[i+1]",
"L",
"i+1",
"i",
"1",
"print(foodCount)",
"print",
"foodCount",
"L = sorted([int(i) for i in input().split()], key=lambda x: x)",
"sorted([int(i) for i in input().split()], key=lambda x: x)",
"L",
"N=int(input())",
"int(input())",
"N",
"foodCount = 0",
"0",
"foodCount",
"foodCount += min(L[i], L[i+1])",
"min(L[i], L[i+1])",
"foodCount"
] | N=int(input())
L = sorted([int(i) for i in input().split()], key=lambda x: x)
foodCount = 0
for i in range(0,len(L), 2):
foodCount += min(L[i], L[i+1])
print(foodCount)
|
[
7,
0,
13,
4,
13,
4,
13,
4,
13,
4,
13,
18,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
39,
17,
10,
4,
13
] | [
[
25,
2
],
[
25,
26
]
] | [
"n=int(input())\nprint(sum(sorted(map(int,input().split()))[::2]))",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"print(sum(sorted(map(int,input().split()))[::2]))",
"print",
"sum(sorted(map(int,input().split()))[::2])",
"sum",
"sorted(map(int,input().split()))[::2]",
"(map(int,input().split()))",
"sorted",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"::2",
"2",
"n=int(input())",
"int(input())",
"n"
] | n=int(input())
print(sum(sorted(map(int,input().split()))[::2])) |
[
7,
12,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
13,
29,
13,
23,
13,
23,
13,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
13,
4,
13,
13,
13,
10,
4,
13,
10,
13,
13,
10,
12,
13
] | [
[
5,
4
],
[
40,
7
],
[
10,
9
],
[
13,
12
],
[
38,
18
],
[
22,
21
],
[
4,
25
],
[
12,
26
],
[
4,
28
],
[
12,
30
],
[
34,
33
],
[
21,
34
],
[
33,
36
],
[
9,
36
],
[
38,
38
],
[
40,
40
],
[
69,
42
],
[
50,
49
],
[
49,
58
],
[
72,
60
],
[
76,
65
],
[
70,
66
],
[
73,
67
],
[
69,
70
],
[
72,
73
]
] | [
"#1\ndef solution(n, skewers):\n sorted_s = sorted(skewers)\n answer = 0\n for i in range(0, 2*n, 2):\n smaller = min(sorted_s[i],sorted_s[i+1])\n answer += smaller\n return answer\n\nn = int(input())\nskewers = [int(x) for x in input().split()]\nprint(solution(n, skewers))",
"def solution(n, skewers):\n sorted_s = sorted(skewers)\n answer = 0\n for i in range(0, 2*n, 2):\n smaller = min(sorted_s[i],sorted_s[i+1])\n answer += smaller\n return answer",
"solution",
"sorted_s = sorted(skewers)",
"sorted_s",
"sorted(skewers)",
"sorted",
"skewers",
"answer = 0",
"answer",
"0",
"for i in range(0, 2*n, 2):\n smaller = min(sorted_s[i],sorted_s[i+1])\n answer += smaller\n ",
"i",
"range(0, 2*n, 2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"smaller = min(sorted_s[i],sorted_s[i+1])",
"smaller",
"min(sorted_s[i],sorted_s[i+1])",
"min",
"sorted_s[i]",
"sorted_s",
"i",
"sorted_s[i+1]",
"sorted_s",
"i+1",
"i",
"1",
"answer += smaller",
"answer",
"smaller",
"return answer",
"answer",
"n",
"n",
"skewers",
"skewers",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"skewers = [int(x) for x in input().split()]",
"skewers",
"[int(x) for x in input().split()]",
"print(solution(n, skewers))",
"print",
"solution(n, skewers)",
"solution",
"n",
"skewers",
"n = int(input())",
"int(input())",
"n",
"skewers = [int(x) for x in input().split()]",
"[int(x) for x in input().split()]",
"skewers",
"def solution(n, skewers):\n sorted_s = sorted(skewers)\n answer = 0\n for i in range(0, 2*n, 2):\n smaller = min(sorted_s[i],sorted_s[i+1])\n answer += smaller\n return answer",
"def solution(n, skewers):\n sorted_s = sorted(skewers)\n answer = 0\n for i in range(0, 2*n, 2):\n smaller = min(sorted_s[i],sorted_s[i+1])\n answer += smaller\n return answer",
"solution"
] | #1
def solution(n, skewers):
sorted_s = sorted(skewers)
answer = 0
for i in range(0, 2*n, 2):
smaller = min(sorted_s[i],sorted_s[i+1])
answer += smaller
return answer
n = int(input())
skewers = [int(x) for x in input().split()]
print(solution(n, skewers)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
4,
13,
13,
17,
40,
17,
0,
13,
2,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
2,
13,
10,
4,
13
] | [
[
58,
2
],
[
49,
8
],
[
50,
21
],
[
52,
24
],
[
28,
27
],
[
50,
34
],
[
55,
39
],
[
53,
41
],
[
56,
41
],
[
50,
43
],
[
27,
44
],
[
56,
47
],
[
53,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"num_meals = int(input())\nskewers = list(map(int, input().split()))\nskewers.sort()\ningredients = 0\nfor skewer in range(0,(len(skewers) - 1),+2):\n ingredients = ingredients + skewers[skewer]\nprint(ingredients)",
"num_meals = int(input())",
"num_meals",
"int(input())",
"int",
"input()",
"input",
"skewers = list(map(int, input().split()))",
"skewers",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"skewers.sort()",
"skewers.sort",
"skewers",
"sort",
"ingredients = 0",
"ingredients",
"0",
"for skewer in range(0,(len(skewers) - 1),+2):\n ingredients = ingredients + skewers[skewer]",
"skewer",
"range(0,(len(skewers) - 1),+2)",
"range",
"0",
"len(skewers) - 1",
"len(skewers)",
"len",
"skewers",
"1",
"+2",
"2",
"ingredients = ingredients + skewers[skewer]",
"ingredients",
"ingredients + skewers[skewer]",
"ingredients",
"skewers[skewer]",
"skewers",
"skewer",
"print(ingredients)",
"print",
"ingredients",
"skewers = list(map(int, input().split()))",
"list(map(int, input().split()))",
"skewers",
"ingredients = 0",
"0",
"ingredients",
"ingredients = ingredients + skewers[skewer]",
"ingredients + skewers[skewer]",
"ingredients",
"num_meals = int(input())",
"int(input())",
"num_meals"
] | 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)
|
[
7,
0,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
17,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
41,
28,
13,
4,
13,
4,
13,
13,
2,
2,
13,
17,
17,
4,
18,
13,
13,
4,
13,
4,
13,
13,
10,
13,
13,
10,
4,
13
] | [
[
51,
2
],
[
8,
7
],
[
7,
17
],
[
48,
19
],
[
49,
23
],
[
28,
27
],
[
49,
32
],
[
27,
35
],
[
49,
40
],
[
27,
41
],
[
48,
49
],
[
51,
52
]
] | [
"N = input()\nL = [int(j) for j in input().split(' ')]\nL.sort()\nprint(sum([L[j] for j in range(len(L)) if j % 2 == 0]))",
"N = input()",
"N",
"input()",
"input",
"int(j) for j in input().split(' ')",
"for j in input().split(' ')",
"j",
"input().split(' ')",
"().split",
"()",
"input",
"split",
"' '",
"for j in input().split(' ')",
"int(j)",
"int",
"j",
"L = [int(j) for j in input().split(' ')]",
"L",
"[int(j) for j in input().split(' ')]",
"L.sort()",
"L.sort",
"L",
"sort",
"L[j] for j in range(len(L)) if j % 2 == 0",
"for j in range(len(L)) if j % 2 == 0",
"j",
"range(len(L))",
"range",
"len(L)",
"len",
"L",
"j % 2 == 0",
"j % 2",
"j",
"2",
"0",
"if j % 2 == 0",
"L[j]",
"L",
"j",
"print(sum([L[j] for j in range(len(L)) if j % 2 == 0]))",
"print",
"sum([L[j] for j in range(len(L)) if j % 2 == 0])",
"sum",
"[L[j] for j in range(len(L)) if j % 2 == 0]",
"L = [int(j) for j in input().split(' ')]",
"[int(j) for j in input().split(' ')]",
"L",
"N = input()",
"input()",
"N"
] | N = input()
L = [int(j) for j in input().split(' ')]
L.sort()
print(sum([L[j] for j in range(len(L)) if j % 2 == 0]))
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
9,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13
] | [
[
47,
2
],
[
56,
8
],
[
53,
22
],
[
26,
25
],
[
48,
30
],
[
25,
34
],
[
50,
39
],
[
57,
41
],
[
25,
42
],
[
51,
45
],
[
54,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
]
] | [
"N = int(input())\nL = sorted(list(map(int,input().split())))\nans = 0\nfor i in range(2*N):\n if i % 2 == 1:\n continue\n else:\n ans += L[i]\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = sorted(list(map(int,input().split())))",
"L",
"sorted(list(map(int,input().split())))",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans = 0",
"ans",
"0",
"for i in range(2*N):\n if i % 2 == 1:\n continue\n else:\n ans += L[i]",
"i",
"range(2*N)",
"range",
"2*N",
"2",
"N",
"if i % 2 == 1:\n continue\n else:\n ans += L[i]",
"i % 2 == 1",
"i % 2",
"i",
"2",
"1",
"continue",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"ans += L[i]",
"L[i]",
"ans",
"ans = 0",
"0",
"ans",
"L = sorted(list(map(int,input().split())))",
"sorted(list(map(int,input().split())))",
"L"
] | N = int(input())
L = sorted(list(map(int,input().split())))
ans = 0
for i in range(2*N):
if i % 2 == 1:
continue
else:
ans += L[i]
print(ans)
|
[
7,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
13,
13
] | [
[
6,
5
],
[
5,
14
],
[
35,
16
],
[
36,
20
],
[
24,
23
],
[
36,
30
],
[
35,
36
]
] | [
"input()\nL=[int(l) for l in input().split()]\nL.sort(reverse=True)\nprint(sum(L[1::2]))",
"input()",
"input",
"int(l) for l in input().split()",
"for l in input().split()",
"l",
"input().split()",
"().split",
"()",
"input",
"split",
"for l in input().split()",
"int(l)",
"int",
"l",
"L=[int(l) for l in input().split()]",
"L",
"[int(l) for l in input().split()]",
"L.sort(reverse=True)",
"L.sort",
"L",
"sort",
"reverse=True",
"reverse",
"True",
"print(sum(L[1::2]))",
"print",
"sum(L[1::2])",
"sum",
"L[1::2]",
"L",
"1::2",
"1",
"2",
"L=[int(l) for l in input().split()]",
"[int(l) for l in input().split()]",
"L"
] | input()
L=[int(l) for l in input().split()]
L.sort(reverse=True)
print(sum(L[1::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
0,
13,
18,
13,
39,
17,
17,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13
] | [
[
40,
2
],
[
49,
8
],
[
43,
20
],
[
50,
23
],
[
26,
25
],
[
46,
28
],
[
44,
30
],
[
50,
30
],
[
47,
38
],
[
40,
41
],
[
43,
44
],
[
46,
47
],
[
49,
50
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nL = sorted(L, reverse=True)\nmL = L[1::2]\nprint(sum(mL))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L = sorted(L, reverse=True)",
"L",
"sorted(L, reverse=True)",
"sorted",
"L",
"reverse=True",
"reverse",
"True",
"mL = L[1::2]",
"mL",
"L[1::2]",
"L",
"1::2",
"1",
"2",
"print(sum(mL))",
"print",
"sum(mL)",
"sum",
"mL",
"N = int(input())",
"int(input())",
"N",
"L = sorted(L, reverse=True)",
"sorted(L, reverse=True)",
"L",
"mL = L[1::2]",
"L[1::2]",
"mL",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L"
] | N = int(input())
L = list(map(int, input().split()))
L = sorted(L, reverse=True)
mL = L[1::2]
print(sum(mL)) |
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
17,
13,
13,
31,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
39,
17,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
17
],
[
25,
24
],
[
24,
33
],
[
42,
39
]
] | [
"# AGC001A - BBQ Easy\ndef main():\n N, *L = map(int, open(0).read().split())\n L.sort()\n ans = sum(L[::2])\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()",
"def main():\n N, *L = map(int, open(0).read().split())\n L.sort()\n ans = sum(L[::2])\n print(ans)",
"main",
"N, *L = map(int, open(0).read().split())",
"N",
"map(int, open(0).read().split())",
"map",
"int",
"open(0).read().split()",
"(0).read().split",
"(0).read()",
"(0).read",
"(0)",
"open",
"0",
"read",
"split",
"*L",
"L",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = sum(L[::2])",
"ans",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"print(ans)",
"print",
"ans",
"if __name__ == \"__main__\":\n main()",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"main()",
"main",
"def main():\n N, *L = map(int, open(0).read().split())\n L.sort()\n ans = sum(L[::2])\n print(ans)",
"def main():\n N, *L = map(int, open(0).read().split())\n L.sort()\n ans = sum(L[::2])\n print(ans)",
"main"
] | # AGC001A - BBQ Easy
def main():
N, *L = map(int, open(0).read().split())
L.sort()
ans = sum(L[::2])
print(ans)
if __name__ == "__main__":
main() |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
54,
2
],
[
48,
8
],
[
49,
21
],
[
57,
24
],
[
28,
27
],
[
49,
32
],
[
27,
36
],
[
51,
40
],
[
49,
42
],
[
27,
43
],
[
52,
46
],
[
58,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
]
] | [
"n = int(input())\nl = list(map(int, input().split()))\nl.sort()\nsum = 0\n#print(l)\n\nfor i in range(len(l)):\n if i % 2 == 0:\n sum += l[i]\nprint(sum)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"sum = 0",
"sum",
"0",
"for i in range(len(l)):\n if i % 2 == 0:\n sum += l[i]",
"i",
"range(len(l))",
"range",
"len(l)",
"len",
"l",
"if i % 2 == 0:\n sum += l[i]",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"sum += l[i]",
"sum",
"l[i]",
"l",
"i",
"print(sum)",
"print",
"sum",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l",
"sum += l[i]",
"l[i]",
"sum",
"n = int(input())",
"int(input())",
"n",
"sum = 0",
"0",
"sum"
] | n = int(input())
l = list(map(int, input().split()))
l.sort()
sum = 0
#print(l)
for i in range(len(l)):
if i % 2 == 0:
sum += l[i]
print(sum) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
17,
13,
14,
40,
2,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
53,
2
],
[
47,
8
],
[
48,
21
],
[
56,
24
],
[
28,
27
],
[
54,
32
],
[
27,
36
],
[
50,
39
],
[
48,
41
],
[
27,
42
],
[
51,
45
],
[
57,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
]
] | [
"n = int(input())\na = list(map(int, input().split()))\n\na.sort()\nans = 0\nfor i in range(2*n):\n\tif not i&1:\n\t\tans += a[i]\n\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"a = list(map(int, input().split()))",
"a",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"a.sort()",
"a.sort",
"a",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(2*n):\n\tif not i&1:\n\t\tans += a[i]",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if not i&1:\n\t\tans += a[i]",
"not i&1",
"i&1",
"i",
"1",
"ans += a[i]",
"ans",
"a[i]",
"a",
"i",
"print(ans)",
"print",
"ans",
"a = list(map(int, input().split()))",
"list(map(int, input().split()))",
"a",
"ans += a[i]",
"a[i]",
"ans",
"n = int(input())",
"int(input())",
"n",
"ans = 0",
"0",
"ans"
] | n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(2*n):
if not i&1:
ans += a[i]
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13
] | [
[
47,
2
],
[
50,
8
],
[
51,
21
],
[
25,
24
],
[
56,
27
],
[
31,
30
],
[
48,
33
],
[
53,
35
],
[
51,
37
],
[
30,
41
],
[
54,
45
],
[
57,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
]
] | [
"n = int(input())\nls = list(map(int, input().split()))\n\nls.sort(reverse=True)\n\nans = 0\n\nfor i in range(n):\n ans += ls[2 * i + 1]\n\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"ls = list(map(int, input().split()))",
"ls",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ls.sort(reverse=True)",
"ls.sort",
"ls",
"sort",
"reverse=True",
"reverse",
"True",
"ans = 0",
"ans",
"0",
"for i in range(n):\n ans += ls[2 * i + 1]",
"i",
"range(n)",
"range",
"n",
"ans += ls[2 * i + 1]",
"ans",
"ls[2 * i + 1]",
"ls",
"2 * i + 1",
"2 * i",
"2",
"i",
"1",
"print(ans)",
"print",
"ans",
"n = int(input())",
"int(input())",
"n",
"ls = list(map(int, input().split()))",
"list(map(int, input().split()))",
"ls",
"ans += ls[2 * i + 1]",
"ls[2 * i + 1]",
"ans",
"ans = 0",
"0",
"ans"
] | n = int(input())
ls = list(map(int, input().split()))
ls.sort(reverse=True)
ans = 0
for i in range(n):
ans += ls[2 * i + 1]
print(ans) |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13
] | [
[
44,
4
],
[
41,
11
],
[
45,
15
],
[
47,
17
],
[
45,
26
],
[
48,
30
],
[
50,
33
],
[
51,
39
],
[
41,
42
],
[
44,
45
],
[
47,
48
],
[
50,
51
]
] | [
"import sys\ninput = sys.stdin.readline\n\nn=int(input())\nvA=list(map(int,input().split()))\nvA.sort()\nres=sum(a for a in vA[::2])\n\nprint(res)",
"import sys",
"sys",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"vA=list(map(int,input().split()))",
"vA",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"vA.sort()",
"vA.sort",
"vA",
"sort",
"res=sum(a for a in vA[::2])",
"res",
"sum(a for a in vA[::2])",
"sum",
"a",
"print(res)",
"print",
"res",
"n=int(input())",
"int(input())",
"n",
"input = sys.stdin.readline",
"sys.stdin.readline",
"input",
"vA=list(map(int,input().split()))",
"list(map(int,input().split()))",
"vA",
"res=sum(a for a in vA[::2])",
"sum(a for a in vA[::2])",
"res"
] | import sys
input = sys.stdin.readline
n=int(input())
vA=list(map(int,input().split()))
vA.sort()
res=sum(a for a in vA[::2])
print(res)
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
0,
13,
17,
28,
13,
18,
13,
39,
17,
17,
0,
13,
13,
4,
13,
13,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
12,
11
],
[
11,
20
],
[
23,
22
],
[
32,
31
],
[
35,
34
],
[
22,
36
],
[
42,
41
],
[
34,
42
],
[
41,
45
],
[
31,
45
],
[
50,
47
]
] | [
"def resolve():\n N = int(input())\n L = list(reversed(sorted([int(i) for i in input().split()])))\n sumA = 0\n for l in L[1::2]:\n sumA += l\n print(sumA)\n\n\nresolve()",
"def resolve():\n N = int(input())\n L = list(reversed(sorted([int(i) for i in input().split()])))\n sumA = 0\n for l in L[1::2]:\n sumA += l\n print(sumA)",
"resolve",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L = list(reversed(sorted([int(i) for i in input().split()])))",
"L",
"list(reversed(sorted([int(i) for i in input().split()])))",
"list",
"reversed(sorted([int(i) for i in input().split()]))",
"reversed",
"sorted([int(i) for i in input().split()])",
"sorted",
"[int(i) for i in input().split()]",
"sumA = 0",
"sumA",
"0",
"for l in L[1::2]:\n sumA += l\n ",
"l",
"L[1::2]",
"L",
"1::2",
"1",
"2",
"sumA += l",
"sumA",
"l",
"print(sumA)",
"print",
"sumA",
"resolve()",
"resolve",
"def resolve():\n N = int(input())\n L = list(reversed(sorted([int(i) for i in input().split()])))\n sumA = 0\n for l in L[1::2]:\n sumA += l\n print(sumA)",
"def resolve():\n N = int(input())\n L = list(reversed(sorted([int(i) for i in input().split()])))\n sumA = 0\n for l in L[1::2]:\n sumA += l\n print(sumA)",
"resolve"
] | def resolve():
N = int(input())
L = list(reversed(sorted([int(i) for i in input().split()])))
sumA = 0
for l in L[1::2]:
sumA += l
print(sumA)
resolve()
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
13,
13
] | [
[
36,
2
],
[
10,
9
],
[
9,
18
],
[
39,
20
],
[
40,
24
],
[
40,
31
],
[
36,
37
],
[
39,
40
]
] | [
"n = int(input())\na = [int(i) for i in input().split()]\na.sort()\nprint(sum(a[0::2]))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"a = [int(i) for i in input().split()]",
"a",
"[int(i) for i in input().split()]",
"a.sort()",
"a.sort",
"a",
"sort",
"print(sum(a[0::2]))",
"print",
"sum(a[0::2])",
"sum",
"a[0::2]",
"a",
"0::2",
"0",
"2",
"n = int(input())",
"int(input())",
"n",
"a = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"a"
] | n = int(input())
a = [int(i) for i in input().split()]
a.sort()
print(sum(a[0::2])) |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
42,
13,
14,
2,
18,
13,
17,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
14,
2,
4,
13,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
14,
40,
18,
13,
13,
13,
0,
13,
13,
0,
13,
18,
13,
13,
14,
40,
18,
13,
13,
13,
0,
13,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
4,
13,
13,
10,
13,
13,
10,
18,
13,
10,
17,
13,
10,
18,
13,
10,
2,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
18,
13
] | [
[
126,
2
],
[
132,
6
],
[
114,
18
],
[
133,
25
],
[
133,
28
],
[
135,
31
],
[
133,
33
],
[
111,
36
],
[
133,
38
],
[
129,
41
],
[
133,
43
],
[
123,
46
],
[
133,
48
],
[
133,
54
],
[
58,
57
],
[
133,
63
],
[
133,
67
],
[
57,
68
],
[
124,
69
],
[
112,
69
],
[
118,
69
],
[
108,
71
],
[
124,
72
],
[
112,
72
],
[
118,
72
],
[
117,
74
],
[
133,
76
],
[
57,
77
],
[
133,
81
],
[
57,
82
],
[
130,
83
],
[
136,
83
],
[
139,
83
],
[
109,
83
],
[
138,
85
],
[
133,
87
],
[
57,
88
],
[
120,
90
],
[
115,
92
],
[
121,
92
],
[
139,
93
],
[
109,
93
],
[
130,
93
],
[
136,
93
],
[
133,
96
],
[
139,
98
],
[
109,
98
],
[
130,
98
],
[
136,
98
],
[
133,
101
],
[
118,
103
],
[
124,
103
],
[
112,
103
],
[
121,
106
],
[
115,
106
],
[
124,
108
],
[
112,
108
],
[
118,
108
],
[
108,
109
],
[
111,
112
],
[
114,
115
],
[
117,
118
],
[
120,
121
],
[
123,
124
],
[
126,
127
],
[
129,
130
],
[
132,
133
],
[
135,
136
],
[
138,
139
]
] | [
"N=input()\nL=list(map(int,input().split()))\n\nitems=0\n\nwhile(L):\n\n\tif L[0]<L[1] :\n\t\ts_lg=L[0]\n\t\tlg=L[1]\n\telse:\n\t\ts_lg=L[1]\n\t\tlg=L[0]\n\n\tif len(L)>2:\n\t\tfor i in range(2,len(L)) :\n\t\t\tif L[i]>=lg:\n\t\t\t\ts_lg=lg\n\t\t\t\tlg=L[i]\n\t\t\telif L[i]>=s_lg :\n\t\t\t\ts_lg=L[i]\n\n\titems=items+s_lg\n\n\tL.remove(s_lg)\n\tL.remove(lg)\t\n\nprint(items)\t",
"N=input()",
"N",
"input()",
"input",
"L=list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"items=0",
"items",
"0",
"while(L):\n\n\tif L[0]<L[1] :\n\t\ts_lg=L[0]\n\t\tlg=L[1]\n\telse:\n\t\ts_lg=L[1]\n\t\tlg=L[0]\n\n\tif len(L)>2:\n\t\tfor i in range(2,len(L)) :\n\t\t\tif L[i]>=lg:\n\t\t\t\ts_lg=lg\n\t\t\t\tlg=L[i]\n\t\t\telif L[i]>=s_lg :\n\t\t\t\ts_lg=L[i]\n\n\titems=items+s_lg\n\n\tL.remove(s_lg)\n\tL.remove(lg)\t",
"L",
"if L[0]<L[1] :\n\t\ts_lg=L[0]\n\t\tlg=L[1]\n\telse:\n\t\ts_lg=L[1]\n\t\tlg=L[0]\n\n\t",
"L[0]<L[1]",
"L[0]",
"L",
"0",
"L[1]",
"L",
"1",
"s_lg=L[0]",
"s_lg",
"L[0]",
"L",
"0",
"lg=L[1]",
"lg",
"L[1]",
"L",
"1",
"s_lg=L[1]",
"s_lg",
"L[1]",
"L",
"1",
"lg=L[0]",
"lg",
"L[0]",
"L",
"0",
"if len(L)>2:\n\t\tfor i in range(2,len(L)) :\n\t\t\tif L[i]>=lg:\n\t\t\t\ts_lg=lg\n\t\t\t\tlg=L[i]\n\t\t\telif L[i]>=s_lg :\n\t\t\t\ts_lg=L[i]\n\n\t",
"len(L)>2",
"len(L)",
"len",
"L",
"2",
"for i in range(2,len(L)) :\n\t\t\tif L[i]>=lg:\n\t\t\t\ts_lg=lg\n\t\t\t\tlg=L[i]\n\t\t\telif L[i]>=s_lg :\n\t\t\t\ts_lg=L[i]\n\n\t",
"i",
"range(2,len(L))",
"range",
"2",
"len(L)",
"len",
"L",
"if L[i]>=lg:\n\t\t\t\ts_lg=lg\n\t\t\t\tlg=L[i]\n\t\t\telif L[i]>=s_lg :\n\t\t\t\ts_lg=L[i]\n\n\t",
"L[i]>=lg",
"L[i]",
"L",
"i",
"lg",
"s_lg=lg",
"s_lg",
"lg",
"lg=L[i]",
"lg",
"L[i]",
"L",
"i",
"elif L[i]>=s_lg :\n\t\t\t\ts_lg=L[i]\n\n\t",
"L[i]>=s_lg",
"L[i]",
"L",
"i",
"s_lg",
"s_lg=L[i]",
"s_lg",
"L[i]",
"L",
"i",
"items=items+s_lg",
"items",
"items+s_lg",
"items",
"s_lg",
"L.remove(s_lg)",
"L.remove",
"L",
"remove",
"s_lg",
"L.remove(lg)",
"L.remove",
"L",
"remove",
"lg",
"print(items)",
"print",
"items",
"s_lg=lg",
"lg",
"s_lg",
"lg=L[1]",
"L[1]",
"lg",
"items=0",
"0",
"items",
"lg=L[i]",
"L[i]",
"lg",
"items=items+s_lg",
"items+s_lg",
"items",
"lg=L[0]",
"L[0]",
"lg",
"N=input()",
"input()",
"N",
"s_lg=L[1]",
"L[1]",
"s_lg",
"L=list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"s_lg=L[0]",
"L[0]",
"s_lg",
"s_lg=L[i]",
"L[i]",
"s_lg"
] | N=input()
L=list(map(int,input().split()))
items=0
while(L):
if L[0]<L[1] :
s_lg=L[0]
lg=L[1]
else:
s_lg=L[1]
lg=L[0]
if len(L)>2:
for i in range(2,len(L)) :
if L[i]>=lg:
s_lg=lg
lg=L[i]
elif L[i]>=s_lg :
s_lg=L[i]
items=items+s_lg
L.remove(s_lg)
L.remove(lg)
print(items) |
[
7,
0,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
55,
2
],
[
8,
7
],
[
7,
16
],
[
49,
18
],
[
50,
22
],
[
58,
25
],
[
29,
28
],
[
50,
33
],
[
28,
37
],
[
52,
41
],
[
50,
43
],
[
28,
44
],
[
53,
47
],
[
59,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"n = input()\nL = [int(_) for _ in input().split()]\nL.sort()\n\ntotal = 0\n\nfor i in range(len(L)):\n if i % 2 == 0:\n total += L[i]\n \nprint(total)",
"n = input()",
"n",
"input()",
"input",
"int(_) for _ in input().split()",
"for _ in input().split()",
"_",
"input().split()",
"().split",
"()",
"input",
"split",
"for _ in input().split()",
"int(_)",
"int",
"_",
"L = [int(_) for _ in input().split()]",
"L",
"[int(_) for _ in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"total = 0",
"total",
"0",
"for i in range(len(L)):\n if i % 2 == 0:\n total += L[i]\n ",
"i",
"range(len(L))",
"range",
"len(L)",
"len",
"L",
"if i % 2 == 0:\n total += L[i]\n ",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"total += L[i]",
"total",
"L[i]",
"L",
"i",
"print(total)",
"print",
"total",
"L = [int(_) for _ in input().split()]",
"[int(_) for _ in input().split()]",
"L",
"total += L[i]",
"L[i]",
"total",
"n = input()",
"input()",
"n",
"total = 0",
"0",
"total"
] | n = input()
L = [int(_) for _ in input().split()]
L.sort()
total = 0
for i in range(len(L)):
if i % 2 == 0:
total += L[i]
print(total) |
[
7,
15,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
13,
0,
13,
2,
4,
13,
13,
17,
0,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
18,
13,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
4,
13,
13,
10,
4,
13,
10,
2,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
73,
4
],
[
79,
10
],
[
82,
14
],
[
74,
24
],
[
76,
26
],
[
74,
30
],
[
85,
33
],
[
80,
41
],
[
88,
44
],
[
86,
47
],
[
50,
49
],
[
53,
52
],
[
74,
55
],
[
60,
57
],
[
83,
58
],
[
52,
59
],
[
89,
61
],
[
52,
65
],
[
83,
71
],
[
73,
74
],
[
76,
77
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
]
] | [
"import numpy as np\nN =int(input())\ninput_line2 =(input())\nkushisashi_number = list(map(int,np.zeros(N)))\n\nno_kushi = int(N)*2\nkushi_length = list(map(int,input_line2.split()))\n\nkushisashi=sorted(kushi_length,reverse=True)\nfor n in range(N):\n kushisashi_number[n] = kushisashi[2*n+1]\n \nprint(sum(kushisashi_number))",
"import numpy as np",
"numpy",
"N =int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"input_line2 =(input())",
"input_line2",
"input()",
"input",
"kushisashi_number = list(map(int,np.zeros(N)))",
"kushisashi_number",
"list(map(int,np.zeros(N)))",
"list",
"map(int,np.zeros(N))",
"map",
"int",
"np.zeros(N)",
"np.zeros",
"np",
"zeros",
"N",
"no_kushi = int(N)*2",
"no_kushi",
"int(N)*2",
"int(N)",
"int",
"N",
"2",
"kushi_length = list(map(int,input_line2.split()))",
"kushi_length",
"list(map(int,input_line2.split()))",
"list",
"map(int,input_line2.split())",
"map",
"int",
"input_line2.split()",
"input_line2.split",
"input_line2",
"split",
"kushisashi=sorted(kushi_length,reverse=True)",
"kushisashi",
"sorted(kushi_length,reverse=True)",
"sorted",
"kushi_length",
"reverse=True",
"reverse",
"True",
"for n in range(N):\n kushisashi_number[n] = kushisashi[2*n+1]\n ",
"n",
"range(N)",
"range",
"N",
"kushisashi_number[n] = kushisashi[2*n+1]",
"kushisashi_number[n]",
"kushisashi_number",
"n",
"kushisashi[2*n+1]",
"kushisashi",
"2*n+1",
"2*n",
"2",
"n",
"1",
"print(sum(kushisashi_number))",
"print",
"sum(kushisashi_number)",
"sum",
"kushisashi_number",
"N =int(input())",
"int(input())",
"N",
"no_kushi = int(N)*2",
"int(N)*2",
"no_kushi",
"input_line2 =(input())",
"input()",
"input_line2",
"kushisashi_number = list(map(int,np.zeros(N)))",
"list(map(int,np.zeros(N)))",
"kushisashi_number",
"kushi_length = list(map(int,input_line2.split()))",
"list(map(int,input_line2.split()))",
"kushi_length",
"kushisashi=sorted(kushi_length,reverse=True)",
"sorted(kushi_length,reverse=True)",
"kushisashi"
] | import numpy as np
N =int(input())
input_line2 =(input())
kushisashi_number = list(map(int,np.zeros(N)))
no_kushi = int(N)*2
kushi_length = list(map(int,input_line2.split()))
kushisashi=sorted(kushi_length,reverse=True)
for n in range(N):
kushisashi_number[n] = kushisashi[2*n+1]
print(sum(kushisashi_number)) |
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
11,
10
],
[
10,
29
],
[
40,
37
]
] | [
"# AGC001A - BBQ Easy\ndef main():\n n = int(input())\n L = sorted(map(int, input().rstrip().split()))\n print(sum(L[::2]))\n\n\nif __name__ == \"__main__\":\n main()",
"def main():\n n = int(input())\n L = sorted(map(int, input().rstrip().split()))\n print(sum(L[::2]))",
"main",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"L = sorted(map(int, input().rstrip().split()))",
"L",
"sorted(map(int, input().rstrip().split()))",
"sorted",
"map(int, input().rstrip().split())",
"map",
"int",
"input().rstrip().split()",
"().rstrip().split",
"().rstrip()",
"().rstrip",
"()",
"input",
"rstrip",
"split",
"print(sum(L[::2]))",
"print",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"if __name__ == \"__main__\":\n main()",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"main()",
"main",
"def main():\n n = int(input())\n L = sorted(map(int, input().rstrip().split()))\n print(sum(L[::2]))",
"def main():\n n = int(input())\n L = sorted(map(int, input().rstrip().split()))\n print(sum(L[::2]))",
"main"
] | # AGC001A - BBQ Easy
def main():
n = int(input())
L = sorted(map(int, input().rstrip().split()))
print(sum(L[::2]))
if __name__ == "__main__":
main() |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
0,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
54,
2
],
[
63,
6
],
[
64,
19
],
[
23,
22
],
[
66,
25
],
[
51,
28
],
[
32,
31
],
[
64,
31
],
[
67,
36
],
[
58,
36
],
[
60,
40
],
[
64,
42
],
[
67,
43
],
[
58,
43
],
[
57,
45
],
[
61,
49
],
[
52,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
],
[
66,
67
]
] | [
"n = input()\nl = list(map(int, input().split()))\nl.sort(reverse=True)\nc = 0\nans = 0\nfor i in l: \n if c % 2 == 1:\n ans+=l[c]\n c+=1\nprint(ans)",
"n = input()",
"n",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort(reverse=True)",
"l.sort",
"l",
"sort",
"reverse=True",
"reverse",
"True",
"c = 0",
"c",
"0",
"ans = 0",
"ans",
"0",
"for i in l: \n if c % 2 == 1:\n ans+=l[c]\n c+=1",
"i",
"l",
"if c % 2 == 1:\n ans+=l[c]\n ",
"c % 2 == 1",
"c % 2",
"c",
"2",
"1",
"ans+=l[c]",
"ans",
"l[c]",
"l",
"c",
"c+=1",
"c",
"1",
"print(ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"n = input()",
"input()",
"n",
"c+=1",
"1",
"c",
"ans+=l[c]",
"l[c]",
"ans",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l",
"c = 0",
"0",
"c"
] | n = input()
l = list(map(int, input().split()))
l.sort(reverse=True)
c = 0
ans = 0
for i in l:
if c % 2 == 1:
ans+=l[c]
c+=1
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
43,
2
],
[
46,
8
],
[
49,
22
],
[
26,
25
],
[
44,
28
],
[
40,
30
],
[
47,
32
],
[
25,
35
],
[
41,
38
],
[
50,
38
],
[
40,
41
],
[
43,
44
],
[
46,
47
],
[
49,
50
]
] | [
"n = int(input())\nl = sorted(list(map(int, input().split())))\nans = 0\nfor i in range(n):\n ans += l[2 * i]\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = sorted(list(map(int, input().split())))",
"l",
"sorted(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans = 0",
"ans",
"0",
"for i in range(n):\n ans += l[2 * i]",
"i",
"range(n)",
"range",
"n",
"ans += l[2 * i]",
"ans",
"l[2 * i]",
"l",
"2 * i",
"2",
"i",
"print(ans)",
"print",
"ans",
"ans += l[2 * i]",
"l[2 * i]",
"ans",
"n = int(input())",
"int(input())",
"n",
"l = sorted(list(map(int, input().split())))",
"sorted(list(map(int, input().split())))",
"l",
"ans = 0",
"0",
"ans"
] | n = int(input())
l = sorted(list(map(int, input().split())))
ans = 0
for i in range(n):
ans += l[2 * i]
print(ans) |
[
7,
17,
15,
13,
12,
13,
0,
13,
17,
42,
13,
0,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
13,
0,
13,
4,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
13,
4,
13,
13,
23,
13,
14,
2,
13,
17,
4,
13,
18,
18,
13,
13,
39,
17,
10,
12,
13,
10,
12,
13
] | [
[
8,
7
],
[
13,
12
],
[
34,
15
],
[
19,
18
],
[
34,
21
],
[
25,
24
],
[
12,
27
],
[
18,
28
],
[
24,
30
],
[
7,
30
],
[
32,
32
],
[
34,
34
],
[
39,
38
],
[
45,
44
],
[
57,
56
],
[
83,
58
],
[
38,
59
],
[
44,
60
],
[
56,
63
],
[
65,
65
],
[
80,
71
]
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nA - BBQ Easy\nhttps://atcoder.jp/contests/agc001/tasks/agc001_a\n\n\"\"\"\nimport sys\n\n\ndef solve(N, L):\n ans = 0\n while L:\n a = L.pop()\n b = L.pop()\n ans += min(a, b)\n return ans\n\n\ndef main(args):\n N = int(input())\n L = sorted(map(int, input().split()))\n ans = solve(N, L)\n print(ans)\n\n\nif __name__ == '__main__':\n main(sys.argv[1:])",
"\"\"\"\nA - BBQ Easy\nhttps://atcoder.jp/contests/agc001/tasks/agc001_a\n\n\"\"\"",
"import sys",
"sys",
"def solve(N, L):\n ans = 0\n while L:\n a = L.pop()\n b = L.pop()\n ans += min(a, b)\n return ans",
"solve",
"ans = 0",
"ans",
"0",
"while L:\n a = L.pop()\n b = L.pop()\n ans += min(a, b)\n ",
"L",
"a = L.pop()",
"a",
"L.pop()",
"L.pop",
"L",
"pop",
"b = L.pop()",
"b",
"L.pop()",
"L.pop",
"L",
"pop",
"ans += min(a, b)",
"ans",
"min(a, b)",
"min",
"a",
"b",
"return ans",
"ans",
"N",
"N",
"L",
"L",
"def main(args):\n N = int(input())\n L = sorted(map(int, input().split()))\n ans = solve(N, L)\n print(ans)",
"main",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = sorted(map(int, input().split()))",
"L",
"sorted(map(int, input().split()))",
"sorted",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans = solve(N, L)",
"ans",
"solve(N, L)",
"solve",
"N",
"L",
"print(ans)",
"print",
"ans",
"args",
"args",
"if __name__ == '__main__':\n main(sys.argv[1:])",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main(sys.argv[1:])",
"main",
"sys.argv[1:]",
"sys.argv",
"sys",
"argv",
"1:",
"1",
"def main(args):\n N = int(input())\n L = sorted(map(int, input().split()))\n ans = solve(N, L)\n print(ans)",
"def main(args):\n N = int(input())\n L = sorted(map(int, input().split()))\n ans = solve(N, L)\n print(ans)",
"main",
"def solve(N, L):\n ans = 0\n while L:\n a = L.pop()\n b = L.pop()\n ans += min(a, b)\n return ans",
"def solve(N, L):\n ans = 0\n while L:\n a = L.pop()\n b = L.pop()\n ans += min(a, b)\n return ans",
"solve"
] | # -*- coding: utf-8 -*-
"""
A - BBQ Easy
https://atcoder.jp/contests/agc001/tasks/agc001_a
"""
import sys
def solve(N, L):
ans = 0
while L:
a = L.pop()
b = L.pop()
ans += min(a, b)
return ans
def main(args):
N = int(input())
L = sorted(map(int, input().split()))
ans = solve(N, L)
print(ans)
if __name__ == '__main__':
main(sys.argv[1:]) |
[
7,
15,
15,
13,
13,
13,
13,
13,
13,
13,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
2,
2,
17,
17,
17,
12,
13,
12,
13,
12,
13,
12,
13,
23,
13,
0,
13,
4,
13,
0,
13,
4,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
18,
4,
13,
2,
17,
13,
39,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
2,
13,
10,
18,
13,
10,
17,
13,
10,
12,
13,
10,
12,
13,
10,
4,
13,
10,
4,
13,
10,
12,
13,
10,
12,
13
] | [
[
69,
19
],
[
34,
34
],
[
84,
36
],
[
79,
38
],
[
87,
40
],
[
91,
42
],
[
88,
45
],
[
75,
48
],
[
52,
51
],
[
85,
57
],
[
72,
61
],
[
88,
63
],
[
51,
64
],
[
73,
67
],
[
76,
67
],
[
69,
70
],
[
72,
73
],
[
75,
76
],
[
84,
85
],
[
87,
88
]
] | [
"from collections import Counter,defaultdict,deque\nimport sys,heapq,bisect,math,itertools,string,queue,fractions\nsys.setrecursionlimit(10**8)\nmod = 10**9+7\ndef inp(): return int(sys.stdin.readline())\ndef inpl(): return list(map(int, sys.stdin.readline().split()))\ndef inpl_str(): return list(sys.stdin.readline().split())\ndef inpln(n): return list(int(sys.stdin.readline()) for i in range(n))\n\nn = inp()\na = inpl()\na.sort()\nres = 0\nfor i in range(2*n)[::2]:\n res += a[i]\nprint(res)",
"from collections import Counter,defaultdict,deque",
"import sys,heapq,bisect,math,itertools,string,queue,fractions",
"sys",
"heapq",
"bisect",
"math",
"itertools",
"string",
"queue",
"fractions",
"sys.setrecursionlimit(10**8)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10**8",
"10",
"8",
"mod = 10**9+7",
"mod",
"10**9+7",
"10**9",
"10",
"9",
"7",
"def inp(): return int(sys.stdin.readline())",
"inp",
"def inpl(): return list(map(int, sys.stdin.readline().split()))",
"inpl",
"def inpl_str(): return list(sys.stdin.readline().split())",
"inpl_str",
"def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))",
"inpln",
"n",
"n",
"n = inp()",
"n",
"inp()",
"inp",
"a = inpl()",
"a",
"inpl()",
"inpl",
"a.sort()",
"a.sort",
"a",
"sort",
"res = 0",
"res",
"0",
"for i in range(2*n)[::2]:\n res += a[i]",
"i",
"range(2*n)[::2]",
"(2*n)",
"range",
"2*n",
"2",
"n",
"::2",
"2",
"res += a[i]",
"res",
"a[i]",
"a",
"i",
"print(res)",
"print",
"res",
"mod = 10**9+7",
"10**9+7",
"mod",
"res += a[i]",
"a[i]",
"res",
"res = 0",
"0",
"res",
"def inp(): return int(sys.stdin.readline())",
"def inp(): return int(sys.stdin.readline())",
"inp",
"def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))",
"def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))",
"inpln",
"n = inp()",
"inp()",
"n",
"a = inpl()",
"inpl()",
"a",
"def inpl(): return list(map(int, sys.stdin.readline().split()))",
"def inpl(): return list(map(int, sys.stdin.readline().split()))",
"inpl",
"def inpl_str(): return list(sys.stdin.readline().split())",
"def inpl_str(): return list(sys.stdin.readline().split())",
"inpl_str"
] | from collections import Counter,defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))
n = inp()
a = inpl()
a.sort()
res = 0
for i in range(2*n)[::2]:
res += a[i]
print(res)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
57,
2
],
[
63,
8
],
[
64,
21
],
[
25,
24
],
[
54,
27
],
[
31,
30
],
[
58,
33
],
[
60,
35
],
[
64,
39
],
[
30,
42
],
[
64,
44
],
[
30,
48
],
[
61,
52
],
[
55,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"# coding: utf-8\n# Your code here!\nn=int(input())\nl=list(map(int,input().split()))\nl.sort(reverse=True)\nans=0\nfor i in range(n):\n ans+=min(l[2*i],l[2*i+1])\nprint(ans)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l=list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort(reverse=True)",
"l.sort",
"l",
"sort",
"reverse=True",
"reverse",
"True",
"ans=0",
"ans",
"0",
"for i in range(n):\n ans+=min(l[2*i],l[2*i+1])",
"i",
"range(n)",
"range",
"n",
"ans+=min(l[2*i],l[2*i+1])",
"ans",
"min(l[2*i],l[2*i+1])",
"min",
"l[2*i]",
"l",
"2*i",
"2",
"i",
"l[2*i+1]",
"l",
"2*i+1",
"2*i",
"2",
"i",
"1",
"print(ans)",
"print",
"ans",
"ans=0",
"0",
"ans",
"n=int(input())",
"int(input())",
"n",
"ans+=min(l[2*i],l[2*i+1])",
"min(l[2*i],l[2*i+1])",
"ans",
"l=list(map(int,input().split()))",
"list(map(int,input().split()))",
"l"
] | # coding: utf-8
# Your code here!
n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(n):
ans+=min(l[2*i],l[2*i+1])
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
13,
13,
10,
4,
13
] | [
[
38,
2
],
[
10,
9
],
[
9,
18
],
[
35,
20
],
[
36,
24
],
[
36,
31
],
[
35,
36
],
[
38,
39
]
] | [
"n = int(input())\nl = [int(x) for x in input().split()]\nl.sort()\nprint(sum(l[::2]))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"l = [int(x) for x in input().split()]",
"l",
"[int(x) for x in input().split()]",
"l.sort()",
"l.sort",
"l",
"sort",
"print(sum(l[::2]))",
"print",
"sum(l[::2])",
"sum",
"l[::2]",
"l",
"::2",
"2",
"l = [int(x) for x in input().split()]",
"[int(x) for x in input().split()]",
"l",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
l = [int(x) for x in input().split()]
l.sort()
print(sum(l[::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
2,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
2,
13
] | [
[
53,
2
],
[
47,
8
],
[
48,
23
],
[
50,
25
],
[
29,
28
],
[
54,
33
],
[
56,
37
],
[
51,
39
],
[
57,
39
],
[
48,
41
],
[
28,
42
],
[
57,
45
],
[
51,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nlist.sort(l)\ncount = 0\n\nfor i in range(0,n*2,2):\n count = count + l[i]\n\nprint(count)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"list.sort(l)",
"list.sort",
"list",
"sort",
"l",
"count = 0",
"count",
"0",
"for i in range(0,n*2,2):\n count = count + l[i]",
"i",
"range(0,n*2,2)",
"range",
"0",
"n*2",
"n",
"2",
"2",
"count = count + l[i]",
"count",
"count + l[i]",
"count",
"l[i]",
"l",
"i",
"print(count)",
"print",
"count",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"count = 0",
"0",
"count",
"n = int(input())",
"int(input())",
"n",
"count = count + l[i]",
"count + l[i]",
"count"
] | n = int(input())
l = list(map(int,input().split()))
list.sort(l)
count = 0
for i in range(0,n*2,2):
count = count + l[i]
print(count) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
41,
28,
13,
4,
13,
4,
13,
13,
2,
2,
13,
17,
17,
4,
18,
13,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13
] | [
[
49,
2
],
[
10,
9
],
[
9,
18
],
[
52,
20
],
[
53,
24
],
[
29,
28
],
[
53,
33
],
[
28,
36
],
[
53,
41
],
[
28,
42
],
[
49,
50
],
[
52,
53
]
] | [
"n = int(input())\nl = [int(i) for i in input().split()]\nl.sort()\nprint(sum([l[i] for i in range(len(l)) if i%2 == 0]))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"l = [int(i) for i in input().split()]",
"l",
"[int(i) for i in input().split()]",
"l.sort()",
"l.sort",
"l",
"sort",
"l[i] for i in range(len(l)) if i%2 == 0",
"for i in range(len(l)) if i%2 == 0",
"i",
"range(len(l))",
"range",
"len(l)",
"len",
"l",
"i%2 == 0",
"i%2",
"i",
"2",
"0",
"if i%2 == 0",
"l[i]",
"l",
"i",
"print(sum([l[i] for i in range(len(l)) if i%2 == 0]))",
"print",
"sum([l[i] for i in range(len(l)) if i%2 == 0])",
"sum",
"[l[i] for i in range(len(l)) if i%2 == 0]",
"n = int(input())",
"int(input())",
"n",
"l = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"l"
] | n = int(input())
l = [int(i) for i in input().split()]
l.sort()
print(sum([l[i] for i in range(len(l)) if i%2 == 0]))
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
40,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13
] | [
[
51,
2
],
[
54,
8
],
[
55,
21
],
[
25,
24
],
[
60,
27
],
[
31,
30
],
[
55,
35
],
[
30,
39
],
[
57,
43
],
[
55,
45
],
[
30,
46
],
[
58,
49
],
[
61,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"N=int(input())\nL=list(map(int,input().split()))\nL.sort(reverse=True)\nx=0\nfor i in range(len(L)):\n if i%2!=0:\n x+=L[i]\nprint(x)",
"N=int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L=list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort(reverse=True)",
"L.sort",
"L",
"sort",
"reverse=True",
"reverse",
"True",
"x=0",
"x",
"0",
"for i in range(len(L)):\n if i%2!=0:\n x+=L[i]",
"i",
"range(len(L))",
"range",
"len(L)",
"len",
"L",
"if i%2!=0:\n x+=L[i]",
"i%2!=0",
"i%2",
"i",
"2",
"0",
"x+=L[i]",
"x",
"L[i]",
"L",
"i",
"print(x)",
"print",
"x",
"N=int(input())",
"int(input())",
"N",
"L=list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"x+=L[i]",
"L[i]",
"x",
"x=0",
"0",
"x"
] | N=int(input())
L=list(map(int,input().split()))
L.sort(reverse=True)
x=0
for i in range(len(L)):
if i%2!=0:
x+=L[i]
print(x) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
17,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
0,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
13,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13
] | [
[
63,
2
],
[
10,
9
],
[
9,
19
],
[
54,
21
],
[
55,
25
],
[
29,
28
],
[
57,
31
],
[
35,
34
],
[
64,
39
],
[
60,
42
],
[
55,
44
],
[
34,
48
],
[
61,
52
],
[
58,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"n = int(input())\nnum = [int(i) for i in input().split(' ')]\nnum.sort(reverse=True)\nm=0\nfor i in range(1,n+1):\n m+=num[2*i-1]\nprint(m)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split(' ')",
"for i in input().split(' ')",
"i",
"input().split(' ')",
"().split",
"()",
"input",
"split",
"' '",
"for i in input().split(' ')",
"int(i)",
"int",
"i",
"num = [int(i) for i in input().split(' ')]",
"num",
"[int(i) for i in input().split(' ')]",
"num.sort(reverse=True)",
"num.sort",
"num",
"sort",
"reverse=True",
"reverse",
"True",
"m=0",
"m",
"0",
"for i in range(1,n+1):\n m+=num[2*i-1]",
"i",
"range(1,n+1)",
"range",
"1",
"n+1",
"n",
"1",
"m+=num[2*i-1]",
"m",
"num[2*i-1]",
"num",
"2*i-1",
"2*i",
"2",
"i",
"1",
"print(m)",
"print",
"m",
"num = [int(i) for i in input().split(' ')]",
"[int(i) for i in input().split(' ')]",
"num",
"m=0",
"0",
"m",
"m+=num[2*i-1]",
"num[2*i-1]",
"m",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
num = [int(i) for i in input().split(' ')]
num.sort(reverse=True)
m=0
for i in range(1,n+1):
m+=num[2*i-1]
print(m)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
4,
13
] | [
[
39,
2
],
[
36,
8
],
[
37,
21
],
[
25,
24
],
[
37,
31
],
[
36,
37
],
[
39,
40
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\n\nL.sort(reverse=True)\n\nprint(sum(L[1::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort(reverse=True)",
"L.sort",
"L",
"sort",
"reverse=True",
"reverse",
"True",
"print(sum(L[1::2]))",
"print",
"sum(L[1::2])",
"sum",
"L[1::2]",
"L",
"1::2",
"1",
"2",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"N = int(input())",
"int(input())",
"N"
] | N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
print(sum(L[1::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
54,
2
],
[
60,
8
],
[
61,
21
],
[
51,
24
],
[
28,
27
],
[
55,
30
],
[
57,
32
],
[
61,
36
],
[
27,
39
],
[
61,
41
],
[
27,
45
],
[
58,
49
],
[
52,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\n\nL.sort()\n\ncount = 0\nfor i in range(N):\n count += min(L[2*i], L[2*i+1])\n\nprint(count)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"count = 0",
"count",
"0",
"for i in range(N):\n count += min(L[2*i], L[2*i+1])",
"i",
"range(N)",
"range",
"N",
"count += min(L[2*i], L[2*i+1])",
"count",
"min(L[2*i], L[2*i+1])",
"min",
"L[2*i]",
"L",
"2*i",
"2",
"i",
"L[2*i+1]",
"L",
"2*i+1",
"2*i",
"2",
"i",
"1",
"print(count)",
"print",
"count",
"count = 0",
"0",
"count",
"N = int(input())",
"int(input())",
"N",
"count += min(L[2*i], L[2*i+1])",
"min(L[2*i], L[2*i+1])",
"count",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L"
] | N = int(input())
L = list(map(int, input().split()))
L.sort()
count = 0
for i in range(N):
count += min(L[2*i], L[2*i+1])
print(count) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
45,
2
],
[
48,
8
],
[
49,
21
],
[
42,
24
],
[
28,
27
],
[
46,
30
],
[
51,
32
],
[
49,
34
],
[
27,
37
],
[
52,
40
],
[
43,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"n = int(input())\nlis = list(map(int,input().split()))\nlis.sort()\nS = 0\nfor i in range(n):\n S += lis[2*i]\nprint(S)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"lis = list(map(int,input().split()))",
"lis",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"lis.sort()",
"lis.sort",
"lis",
"sort",
"S = 0",
"S",
"0",
"for i in range(n):\n S += lis[2*i]",
"i",
"range(n)",
"range",
"n",
"S += lis[2*i]",
"S",
"lis[2*i]",
"lis",
"2*i",
"2",
"i",
"print(S)",
"print",
"S",
"S = 0",
"0",
"S",
"n = int(input())",
"int(input())",
"n",
"lis = list(map(int,input().split()))",
"list(map(int,input().split()))",
"lis",
"S += lis[2*i]",
"lis[2*i]",
"S"
] | n = int(input())
lis = list(map(int,input().split()))
lis.sort()
S = 0
for i in range(n):
S += lis[2*i]
print(S)
|
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
12,
13,
0,
13,
17,
42,
13,
0,
13,
17,
28,
13,
4,
13,
2,
4,
13,
13,
17,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
0,
18,
13,
13,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
18,
13,
13,
0,
13,
17,
29,
13,
23,
13,
0,
13,
39,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
2,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
2,
13,
10,
4,
13,
10,
4,
13,
10,
12,
13,
10,
17,
13,
10,
39,
13
] | [
[
101,
2
],
[
107,
6
],
[
21,
20
],
[
26,
25
],
[
29,
28
],
[
69,
34
],
[
47,
38
],
[
69,
39
],
[
28,
40
],
[
69,
42
],
[
28,
44
],
[
50,
47
],
[
69,
48
],
[
28,
49
],
[
69,
51
],
[
28,
53
],
[
60,
55
],
[
69,
56
],
[
28,
58
],
[
47,
60
],
[
69,
61
],
[
28,
62
],
[
65,
64
],
[
69,
67
],
[
69,
69
],
[
119,
71
],
[
110,
74
],
[
114,
76
],
[
108,
77
],
[
116,
79
],
[
83,
82
],
[
108,
88
],
[
104,
91
],
[
117,
93
],
[
105,
93
],
[
111,
95
],
[
82,
96
],
[
105,
99
],
[
117,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
],
[
110,
111
],
[
116,
117
],
[
119,
120
]
] | [
"n = input()\nl = list(map(int, input().split()))\ndef bubble_sort(arr):\n change = True\n while change:\n change = False\n for i in range(len(arr) - 1):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n return arr\nans=[]\nL= bubble_sort(l)\nk=0\nfor i in range(0,len(l),2):\n k=k+L[i]\nprint(k)",
"n = input()",
"n",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"def bubble_sort(arr):\n change = True\n while change:\n change = False\n for i in range(len(arr) - 1):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n return arr",
"bubble_sort",
"change = True",
"change",
"True",
"while change:\n change = False\n for i in range(len(arr) - 1):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n ",
"change",
"change = False",
"change",
"False",
"for i in range(len(arr) - 1):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n ",
"i",
"range(len(arr) - 1)",
"range",
"len(arr) - 1",
"len(arr)",
"len",
"arr",
"1",
"if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n ",
"arr[i] > arr[i + 1]",
"arr[i]",
"arr",
"i",
"arr[i + 1]",
"arr",
"i + 1",
"i",
"1",
"arr[i], arr[i + 1] = arr[i + 1], arr[i]",
"arr[i]",
"arr",
"i",
"arr[i + 1]",
"arr",
"i + 1",
"i",
"1",
"arr[i + 1]",
"arr",
"i + 1",
"i",
"1",
"arr[i]",
"arr",
"i",
"change = True",
"change",
"True",
"return arr",
"arr",
"arr",
"arr",
"ans=[]",
"ans",
"[]",
"L= bubble_sort(l)",
"L",
"bubble_sort(l)",
"bubble_sort",
"l",
"k=0",
"k",
"0",
"for i in range(0,len(l),2):\n k=k+L[i]",
"i",
"range(0,len(l),2)",
"range",
"0",
"len(l)",
"len",
"l",
"2",
"k=k+L[i]",
"k",
"k+L[i]",
"k",
"L[i]",
"L",
"i",
"print(k)",
"print",
"k",
"n = input()",
"input()",
"n",
"k=k+L[i]",
"k+L[i]",
"k",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l",
"L= bubble_sort(l)",
"bubble_sort(l)",
"L",
"def bubble_sort(arr):\n change = True\n while change:\n change = False\n for i in range(len(arr) - 1):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n return arr",
"def bubble_sort(arr):\n change = True\n while change:\n change = False\n for i in range(len(arr) - 1):\n if arr[i] > arr[i + 1]:\n arr[i], arr[i + 1] = arr[i + 1], arr[i]\n change = True\n return arr",
"bubble_sort",
"k=0",
"0",
"k",
"ans=[]",
"[]",
"ans"
] | n = input()
l = list(map(int, input().split()))
def bubble_sort(arr):
change = True
while change:
change = False
for i in range(len(arr) - 1):
if arr[i] > arr[i + 1]:
arr[i], arr[i + 1] = arr[i + 1], arr[i]
change = True
return arr
ans=[]
L= bubble_sort(l)
k=0
for i in range(0,len(l),2):
k=k+L[i]
print(k) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
18,
13,
39,
17,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
4,
13
] | [
[
48,
2
],
[
39,
8
],
[
40,
21
],
[
45,
24
],
[
28,
27
],
[
40,
29
],
[
42,
33
],
[
27,
34
],
[
43,
37
],
[
46,
37
],
[
39,
40
],
[
27,
42
],
[
42,
43
],
[
45,
46
],
[
48,
49
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl.sort()\nans = 0\nfor i in l[::2]:\n ans +=i\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = 0",
"ans",
"0",
"for i in l[::2]:\n ans +=i",
"i",
"l[::2]",
"l",
"::2",
"2",
"ans +=i",
"ans",
"i",
"print(ans)",
"print",
"ans",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"ans +=i",
"i",
"ans",
"ans = 0",
"0",
"ans",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0
for i in l[::2]:
ans +=i
print(ans) |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
12,
13,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
18,
13
] | [
[
55,
4
],
[
14,
13
],
[
56,
17
],
[
21,
20
],
[
56,
24
],
[
20,
29
],
[
32,
31
],
[
31,
35
],
[
31,
42
],
[
53,
50
],
[
55,
56
]
] | [
"#!/usr/bin/env python3\n# -*- Coding: utf-8 -*-\n\nimport sys\n\n\ninput = sys.stdin.readline\n\n\ndef main():\n N = int(input())\n L = [int(i) for i in input().split()]\n L.sort()\n print(sum(L[::2]))\n\n\nif __name__ == '__main__':\n main()",
"import sys",
"sys",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"def main():\n N = int(input())\n L = [int(i) for i in input().split()]\n L.sort()\n print(sum(L[::2]))",
"main",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"L = [int(i) for i in input().split()]",
"L",
"[int(i) for i in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"print(sum(L[::2]))",
"print",
"sum(L[::2])",
"sum",
"L[::2]",
"L",
"::2",
"2",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n N = int(input())\n L = [int(i) for i in input().split()]\n L.sort()\n print(sum(L[::2]))",
"def main():\n N = int(input())\n L = [int(i) for i in input().split()]\n L.sort()\n print(sum(L[::2]))",
"main",
"input = sys.stdin.readline",
"sys.stdin.readline",
"input"
] | #!/usr/bin/env python3
# -*- Coding: utf-8 -*-
import sys
input = sys.stdin.readline
def main():
N = int(input())
L = [int(i) for i in input().split()]
L.sort()
print(sum(L[::2]))
if __name__ == '__main__':
main()
|
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
0,
13,
4,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
65,
2
],
[
59,
6
],
[
60,
19
],
[
62,
22
],
[
26,
25
],
[
66,
30
],
[
68,
32
],
[
60,
36
],
[
25,
39
],
[
60,
41
],
[
25,
45
],
[
56,
48
],
[
69,
51
],
[
57,
54
],
[
63,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
],
[
65,
66
],
[
68,
69
]
] | [
"wood = input()\n\nlis_1 = list(map(int,input().split()))\n\nlis_1.sort()\n\nguzai = 0\n\nfor i in range(int(wood)):\n max_gu = min(lis_1[2*i],lis_1[2*i+1])\n guzai += int(max_gu)\nprint(guzai)\n\n",
"wood = input()",
"wood",
"input()",
"input",
"lis_1 = list(map(int,input().split()))",
"lis_1",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"lis_1.sort()",
"lis_1.sort",
"lis_1",
"sort",
"guzai = 0",
"guzai",
"0",
"for i in range(int(wood)):\n max_gu = min(lis_1[2*i],lis_1[2*i+1])\n guzai += int(max_gu)",
"i",
"range(int(wood))",
"range",
"int(wood)",
"int",
"wood",
"max_gu = min(lis_1[2*i],lis_1[2*i+1])",
"max_gu",
"min(lis_1[2*i],lis_1[2*i+1])",
"min",
"lis_1[2*i]",
"lis_1",
"2*i",
"2",
"i",
"lis_1[2*i+1]",
"lis_1",
"2*i+1",
"2*i",
"2",
"i",
"1",
"guzai += int(max_gu)",
"guzai",
"int(max_gu)",
"int",
"max_gu",
"print(guzai)",
"print",
"guzai",
"guzai += int(max_gu)",
"int(max_gu)",
"guzai",
"lis_1 = list(map(int,input().split()))",
"list(map(int,input().split()))",
"lis_1",
"guzai = 0",
"0",
"guzai",
"wood = input()",
"input()",
"wood",
"max_gu = min(lis_1[2*i],lis_1[2*i+1])",
"min(lis_1[2*i],lis_1[2*i+1])",
"max_gu"
] | wood = input()
lis_1 = list(map(int,input().split()))
lis_1.sort()
guzai = 0
for i in range(int(wood)):
max_gu = min(lis_1[2*i],lis_1[2*i+1])
guzai += int(max_gu)
print(guzai)
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
11,
10
],
[
25,
24
],
[
28,
27
],
[
4,
33
],
[
37,
36
],
[
10,
38
],
[
27,
39
],
[
36,
42
],
[
24,
42
],
[
47,
44
]
] | [
"def main():\n n = int(input())\n l = list(sorted(map(int, input().split())))\n ans = 0\n for i in range(0, 2*n, 2):\n ans += l[i]\n print(ans)\n\n\nmain()",
"def main():\n n = int(input())\n l = list(sorted(map(int, input().split())))\n ans = 0\n for i in range(0, 2*n, 2):\n ans += l[i]\n print(ans)",
"main",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(sorted(map(int, input().split())))",
"l",
"list(sorted(map(int, input().split())))",
"list",
"sorted(map(int, input().split()))",
"sorted",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans = 0",
"ans",
"0",
"for i in range(0, 2*n, 2):\n ans += l[i]\n ",
"i",
"range(0, 2*n, 2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"ans += l[i]",
"ans",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"main()",
"main",
"def main():\n n = int(input())\n l = list(sorted(map(int, input().split())))\n ans = 0\n for i in range(0, 2*n, 2):\n ans += l[i]\n print(ans)",
"def main():\n n = int(input())\n l = list(sorted(map(int, input().split())))\n ans = 0\n for i in range(0, 2*n, 2):\n ans += l[i]\n print(ans)",
"main"
] | def main():
n = int(input())
l = list(sorted(map(int, input().split())))
ans = 0
for i in range(0, 2*n, 2):
ans += l[i]
print(ans)
main() |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
4,
13,
10,
4,
13
] | [
[
32,
2
],
[
35,
8
],
[
36,
21
],
[
36,
28
],
[
32,
33
],
[
35,
36
]
] | [
"n=int(input())\nl = list(map(int, input().split()))\nl.sort()\nprint(sum(l[::2]))",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"print(sum(l[::2]))",
"print",
"sum(l[::2])",
"sum",
"l[::2]",
"l",
"::2",
"2",
"n=int(input())",
"int(input())",
"n",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l"
] | n=int(input())
l = list(map(int, input().split()))
l.sort()
print(sum(l[::2])) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
17,
13,
13,
31,
13,
4,
18,
13,
13,
4,
13,
4,
13,
4,
13,
13,
13,
10,
4,
13
] | [
[
30,
2
],
[
30,
15
],
[
30,
31
]
] | [
"N,*L=map(int,open(0).read().split());L.sort();print(sum(min(a,b)for a,b in zip(L[::2],L[1::2])))",
"N,*L=map(int,open(0).read().split())",
"N",
"map(int,open(0).read().split())",
"map",
"int",
"open(0).read().split()",
"(0).read().split",
"(0).read()",
"(0).read",
"(0)",
"open",
"0",
"read",
"split",
"*L",
"L",
"L.sort()",
"L.sort",
"L",
"sort",
"print(sum(min(a,b)for a,b in zip(L[::2],L[1::2])))",
"print",
"sum(min(a,b)for a,b in zip(L[::2],L[1::2]))",
"sum",
"min(a,b)",
"min",
"a",
"b",
"N,*L=map(int,open(0).read().split())",
"map(int,open(0).read().split())",
"N"
] | N,*L=map(int,open(0).read().split());L.sort();print(sum(min(a,b)for a,b in zip(L[::2],L[1::2]))) |
[
7,
15,
13,
0,
13,
4,
13,
0,
13,
4,
18,
4,
13,
13,
41,
28,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
13,
13,
10,
4,
13
] | [
[
45,
4
],
[
39,
8
],
[
17,
16
],
[
40,
16
],
[
16,
21
],
[
42,
23
],
[
43,
27
],
[
43,
34
],
[
39,
40
],
[
42,
43
],
[
45,
46
]
] | [
"import numpy as np\na = input()\nc = input().split()\n\nd = [int(i) for i in c]\nd.sort()\n\nprint(sum(d[0::2]))",
"import numpy as np",
"numpy",
"a = input()",
"a",
"input()",
"input",
"c = input().split()",
"c",
"input().split()",
"().split",
"()",
"input",
"split",
"int(i) for i in c",
"for i in c",
"i",
"c",
"for i in c",
"int(i)",
"int",
"i",
"d = [int(i) for i in c]",
"d",
"[int(i) for i in c]",
"d.sort()",
"d.sort",
"d",
"sort",
"print(sum(d[0::2]))",
"print",
"sum(d[0::2])",
"sum",
"d[0::2]",
"d",
"0::2",
"0",
"2",
"c = input().split()",
"input().split()",
"c",
"d = [int(i) for i in c]",
"[int(i) for i in c]",
"d",
"a = input()",
"input()",
"a"
] | import numpy as np
a = input()
c = input().split()
d = [int(i) for i in c]
d.sort()
print(sum(d[0::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
54,
2
],
[
60,
8
],
[
61,
21
],
[
25,
24
],
[
57,
27
],
[
31,
30
],
[
55,
36
],
[
63,
39
],
[
61,
43
],
[
30,
44
],
[
61,
46
],
[
30,
48
],
[
64,
52
],
[
58,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nL.sort(reverse=True)\n\nans = 0\nfor i in range(0, 2 * N, 2):\n ans += min(L[i], L[i + 1])\n\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort(reverse=True)",
"L.sort",
"L",
"sort",
"reverse=True",
"reverse",
"True",
"ans = 0",
"ans",
"0",
"for i in range(0, 2 * N, 2):\n ans += min(L[i], L[i + 1])",
"i",
"range(0, 2 * N, 2)",
"range",
"0",
"2 * N",
"2",
"N",
"2",
"ans += min(L[i], L[i + 1])",
"ans",
"min(L[i], L[i + 1])",
"min",
"L[i]",
"L",
"i",
"L[i + 1]",
"L",
"i + 1",
"i",
"1",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"ans = 0",
"0",
"ans",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"ans += min(L[i], L[i + 1])",
"min(L[i], L[i + 1])",
"ans"
] | N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
ans = 0
for i in range(0, 2 * N, 2):
ans += min(L[i], L[i + 1])
print(ans)
|
[
7,
14,
2,
13,
17,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
13,
17,
18,
13,
2,
2,
13,
17,
17,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
67,
6
],
[
14,
13
],
[
13,
22
],
[
58,
24
],
[
59,
28
],
[
64,
31
],
[
35,
34
],
[
68,
37
],
[
61,
39
],
[
59,
43
],
[
34,
45
],
[
59,
48
],
[
34,
51
],
[
62,
56
],
[
65,
56
],
[
58,
59
],
[
61,
62
],
[
64,
65
],
[
67,
68
]
] | [
"if __name__ == '__main__':\n n =int(input())\n a = [int(i) for i in input().split()]\n a.sort()\n count =0\n\n for i in range(n):\n count+=min(a[i*2],a[i*2+1])\n print(count)",
"if __name__ == '__main__':\n n =int(input())\n a = [int(i) for i in input().split()]\n a.sort()\n count =0\n\n for i in range(n):\n count+=min(a[i*2],a[i*2+1])\n print(count)",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"n =int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"a = [int(i) for i in input().split()]",
"a",
"[int(i) for i in input().split()]",
"a.sort()",
"a.sort",
"a",
"sort",
"count =0",
"count",
"0",
"for i in range(n):\n count+=min(a[i*2],a[i*2+1])\n ",
"i",
"range(n)",
"range",
"n",
"count+=min(a[i*2],a[i*2+1])",
"count",
"min(a[i*2],a[i*2+1])",
"min",
"a[i*2]",
"a",
"i*2",
"i",
"2",
"a[i*2+1]",
"a",
"i*2+1",
"i*2",
"i",
"2",
"1",
"print(count)",
"print",
"count",
"a = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"a",
"count+=min(a[i*2],a[i*2+1])",
"min(a[i*2],a[i*2+1])",
"count",
"count =0",
"0",
"count",
"n =int(input())",
"int(input())",
"n"
] | if __name__ == '__main__':
n =int(input())
a = [int(i) for i in input().split()]
a.sort()
count =0
for i in range(n):
count+=min(a[i*2],a[i*2+1])
print(count) |
[
7,
15,
13,
12,
13,
12,
13,
12,
13,
12,
13,
0,
13,
4,
13,
0,
13,
4,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
29,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
12,
13,
10,
12,
13,
10,
12,
13
] | [
[
13,
12
],
[
68,
14
],
[
17,
16
],
[
59,
18
],
[
16,
21
],
[
25,
24
],
[
28,
27
],
[
12,
30
],
[
33,
32
],
[
16,
36
],
[
27,
39
],
[
16,
41
],
[
27,
45
],
[
32,
49
],
[
24,
49
],
[
62,
56
]
] | [
"#!/usr/bin/env python3\nimport sys\n# input = sys.stdin.readline\ndef INT(): return int(input())\ndef MAP(): return map(int,input().split())\ndef LI(): return list(map(int,input().split()))\n\ndef main():\n N = INT()\n L = LI()\n L.sort()\n answer = 0\n for i in range(N):\n answer += min(L[2*i],L[2*i+1])\n\n print(answer)\n return\n\nif __name__ == '__main__':\n main()",
"import sys",
"sys",
"def INT(): return int(input())",
"INT",
"def MAP(): return map(int,input().split())",
"MAP",
"def LI(): return list(map(int,input().split()))",
"LI",
"def main():\n N = INT()\n L = LI()\n L.sort()\n answer = 0\n for i in range(N):\n answer += min(L[2*i],L[2*i+1])\n\n print(answer)\n return",
"main",
"N = INT()",
"N",
"INT()",
"INT",
"L = LI()",
"L",
"LI()",
"LI",
"L.sort()",
"L.sort",
"L",
"sort",
"answer = 0",
"answer",
"0",
"for i in range(N):\n answer += min(L[2*i],L[2*i+1])\n\n ",
"i",
"range(N)",
"range",
"N",
"answer += min(L[2*i],L[2*i+1])",
"answer",
"min(L[2*i],L[2*i+1])",
"min",
"L[2*i]",
"L",
"2*i",
"2",
"i",
"L[2*i+1]",
"L",
"2*i+1",
"2*i",
"2",
"i",
"1",
"print(answer)",
"print",
"answer",
"return",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def LI(): return list(map(int,input().split()))",
"def LI(): return list(map(int,input().split()))",
"LI",
"def main():\n N = INT()\n L = LI()\n L.sort()\n answer = 0\n for i in range(N):\n answer += min(L[2*i],L[2*i+1])\n\n print(answer)\n return",
"def main():\n N = INT()\n L = LI()\n L.sort()\n answer = 0\n for i in range(N):\n answer += min(L[2*i],L[2*i+1])\n\n print(answer)\n return",
"main",
"def MAP(): return map(int,input().split())",
"def MAP(): return map(int,input().split())",
"MAP",
"def INT(): return int(input())",
"def INT(): return int(input())",
"INT"
] | #!/usr/bin/env python3
import sys
# input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def main():
N = INT()
L = LI()
L.sort()
answer = 0
for i in range(N):
answer += min(L[2*i],L[2*i+1])
print(answer)
return
if __name__ == '__main__':
main()
|
[
7,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
41,
28,
13,
13,
4,
13,
13,
2,
2,
13,
17,
17,
4,
13,
4,
13,
4,
13,
13,
10,
4,
13
] | [
[
39,
4
],
[
40,
17
],
[
40,
25
],
[
39,
40
]
] | [
"input()\nl = list(map(int, input().split()))\nl.sort()\nprint(sum([v for i, v in enumerate(l) if i % 2 == 0]))",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"v for i, v in enumerate(l) if i % 2 == 0",
"for i, v in enumerate(l) if i % 2 == 0",
"i",
"v",
"enumerate(l)",
"enumerate",
"l",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"if i % 2 == 0",
"v",
"print(sum([v for i, v in enumerate(l) if i % 2 == 0]))",
"print",
"sum([v for i, v in enumerate(l) if i % 2 == 0])",
"sum",
"[v for i, v in enumerate(l) if i % 2 == 0]",
"l = list(map(int, input().split()))",
"list(map(int, input().split()))",
"l"
] | input()
l = list(map(int, input().split()))
l.sort()
print(sum([v for i, v in enumerate(l) if i % 2 == 0])) |
[
7,
15,
13,
12,
13,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
42,
2,
13,
2,
17,
13,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
12,
13,
10,
4,
13,
10,
12,
13,
10,
17,
13,
10,
17,
13
] | [
[
55,
8
],
[
71,
12
],
[
67,
14
],
[
65,
20
],
[
23,
22
],
[
58,
25
],
[
76,
28
],
[
59,
32
],
[
74,
32
],
[
56,
35
],
[
61,
37
],
[
68,
41
],
[
59,
42
],
[
74,
42
],
[
68,
44
],
[
59,
46
],
[
74,
46
],
[
73,
49
],
[
62,
53
],
[
77,
53
],
[
55,
56
],
[
58,
59
],
[
61,
62
],
[
67,
68
],
[
73,
74
],
[
76,
77
]
] | [
"###template###\nimport sys\ndef input(): return sys.stdin.readline().rstrip()\ndef mi(): return map(int, input().split())\n###template###\n\nN = int(input())\nKs = sorted(list(mi()), reverse=True)\n\ni = 0\nans = 0\nwhile i < (2*N):\n ans += min(Ks[i],Ks[i+1])\n i += 2\n\nprint(ans)\n",
"import sys",
"sys",
"def input(): return sys.stdin.readline().rstrip()",
"input",
"def mi(): return map(int, input().split())\n###template###",
"mi",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"Ks = sorted(list(mi()), reverse=True)",
"Ks",
"sorted(list(mi()), reverse=True)",
"sorted",
"list(mi())",
"list",
"mi()",
"mi",
"reverse=True",
"reverse",
"True",
"i = 0",
"i",
"0",
"ans = 0",
"ans",
"0",
"while i < (2*N):\n ans += min(Ks[i],Ks[i+1])\n i += 2",
"i < (2*N)",
"i",
"2*N",
"2",
"N",
"ans += min(Ks[i],Ks[i+1])",
"ans",
"min(Ks[i],Ks[i+1])",
"min",
"Ks[i]",
"Ks",
"i",
"Ks[i+1]",
"Ks",
"i+1",
"i",
"1",
"i += 2",
"i",
"2",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"i = 0",
"0",
"i",
"ans += min(Ks[i],Ks[i+1])",
"min(Ks[i],Ks[i+1])",
"ans",
"def mi(): return map(int, input().split())\n###template###",
"def mi(): return map(int, input().split())\n###template###",
"mi",
"Ks = sorted(list(mi()), reverse=True)",
"sorted(list(mi()), reverse=True)",
"Ks",
"def input(): return sys.stdin.readline().rstrip()",
"def input(): return sys.stdin.readline().rstrip()",
"input",
"i += 2",
"2",
"i",
"ans = 0",
"0",
"ans"
] | ###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###
N = int(input())
Ks = sorted(list(mi()), reverse=True)
i = 0
ans = 0
while i < (2*N):
ans += min(Ks[i],Ks[i+1])
i += 2
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
41,
28,
13,
4,
13,
2,
13,
17,
2,
2,
13,
17,
17,
4,
18,
13,
13,
0,
13,
4,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
49,
2
],
[
55,
8
],
[
56,
21
],
[
26,
25
],
[
50,
29
],
[
25,
33
],
[
56,
38
],
[
25,
39
],
[
52,
41
],
[
53,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nL.sort()\nans = sum([L[i] for i in range(N*2) if i % 2 == 0])\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"L[i] for i in range(N*2) if i % 2 == 0",
"for i in range(N*2) if i % 2 == 0",
"i",
"range(N*2)",
"range",
"N*2",
"N",
"2",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"if i % 2 == 0",
"L[i]",
"L",
"i",
"ans = sum([L[i] for i in range(N*2) if i % 2 == 0])",
"ans",
"sum([L[i] for i in range(N*2) if i % 2 == 0])",
"sum",
"[L[i] for i in range(N*2) if i % 2 == 0]",
"print(ans)",
"print",
"ans",
"N = int(input())",
"int(input())",
"N",
"ans = sum([L[i] for i in range(N*2) if i % 2 == 0])",
"sum([L[i] for i in range(N*2) if i % 2 == 0])",
"ans",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L"
] | N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = sum([L[i] for i in range(N*2) if i % 2 == 0])
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
4,
18,
13,
13,
18,
13,
13,
0,
13,
4,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
39,
13,
10,
4,
13
] | [
[
59,
2
],
[
56,
8
],
[
68,
20
],
[
57,
23
],
[
65,
25
],
[
29,
28
],
[
60,
33
],
[
28,
37
],
[
66,
42
],
[
69,
45
],
[
28,
46
],
[
62,
48
],
[
66,
51
],
[
63,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
],
[
65,
66
],
[
68,
69
]
] | [
"n = int(input())\nli = list(map(int, input().split()))\n\nl = sorted(li)\nlis = []\nfor i in range(2*n):\n if (i%2 == 0):\n lis.append(l[i])\n\na = sum(lis)\nprint(a)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"li = list(map(int, input().split()))",
"li",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l = sorted(li)",
"l",
"sorted(li)",
"sorted",
"li",
"lis = []",
"lis",
"[]",
"for i in range(2*n):\n if (i%2 == 0):\n lis.append(l[i])",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if (i%2 == 0):\n lis.append(l[i])",
"i%2 == 0",
"i%2",
"i",
"2",
"0",
"lis.append(l[i])",
"lis.append",
"lis",
"append",
"l[i]",
"l",
"i",
"a = sum(lis)",
"a",
"sum(lis)",
"sum",
"lis",
"print(a)",
"print",
"a",
"li = list(map(int, input().split()))",
"list(map(int, input().split()))",
"li",
"n = int(input())",
"int(input())",
"n",
"a = sum(lis)",
"sum(lis)",
"a",
"lis = []",
"[]",
"lis",
"l = sorted(li)",
"sorted(li)",
"l"
] | n = int(input())
li = list(map(int, input().split()))
l = sorted(li)
lis = []
for i in range(2*n):
if (i%2 == 0):
lis.append(l[i])
a = sum(lis)
print(a) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
41,
28,
13,
4,
13,
17,
2,
17,
13,
17,
4,
18,
13,
13,
4,
13,
4,
13,
13,
10,
13,
13,
10,
4,
13
] | [
[
49,
2
],
[
10,
9
],
[
9,
18
],
[
46,
20
],
[
47,
24
],
[
29,
28
],
[
50,
34
],
[
47,
38
],
[
28,
39
],
[
46,
47
],
[
49,
50
]
] | [
"n=int(input())\na=[int(i) for i in input().split()]\na.sort()\nprint(sum([a[i] for i in range(0,2*n,2)]))",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"a=[int(i) for i in input().split()]",
"a",
"[int(i) for i in input().split()]",
"a.sort()",
"a.sort",
"a",
"sort",
"a[i] for i in range(0,2*n,2)",
"for i in range(0,2*n,2)",
"i",
"range(0,2*n,2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"for i in range(0,2*n,2)",
"a[i]",
"a",
"i",
"print(sum([a[i] for i in range(0,2*n,2)]))",
"print",
"sum([a[i] for i in range(0,2*n,2)])",
"sum",
"[a[i] for i in range(0,2*n,2)]",
"a=[int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"a",
"n=int(input())",
"int(input())",
"n"
] | n=int(input())
a=[int(i) for i in input().split()]
a.sort()
print(sum([a[i] for i in range(0,2*n,2)])) |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
17,
4,
18,
13,
13,
13,
4,
13,
18,
13,
13,
10,
4,
13,
10,
4,
13
] | [
[
27,
2
],
[
30,
6
],
[
31,
18
],
[
31,
24
],
[
27,
28
],
[
30,
31
]
] | [
"N = input()\nLs = map(int,raw_input().split(\" \"))\n\nLs.sort()\nprint sum(Ls[i] for i in range(0,N*2,2))",
"N = input()",
"N",
"input()",
"input",
"Ls = map(int,raw_input().split(\" \"))",
"Ls",
"map(int,raw_input().split(\" \"))",
"map",
"int",
"raw_input().split(\" \")",
"().split",
"()",
"raw_input",
"split",
"\" \"",
"Ls.sort()",
"Ls.sort",
"Ls",
"sort",
"print",
"sum(Ls[i] for i in range(0,N*2,2))",
"sum",
"Ls[i]",
"Ls",
"i",
"N = input()",
"input()",
"N",
"Ls = map(int,raw_input().split(\" \"))",
"map(int,raw_input().split(\" \"))",
"Ls"
] | N = input()
Ls = map(int,raw_input().split(" "))
Ls.sort()
print sum(Ls[i] for i in range(0,N*2,2)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
14,
2,
13,
13,
3,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
78,
2
],
[
72,
8
],
[
23,
22
],
[
69,
25
],
[
75,
28
],
[
32,
31
],
[
73,
37
],
[
76,
41
],
[
67,
41
],
[
79,
42
],
[
63,
45
],
[
73,
49
],
[
31,
50
],
[
73,
52
],
[
31,
54
],
[
66,
57
],
[
64,
61
],
[
70,
61
],
[
63,
64
],
[
66,
67
],
[
69,
70
],
[
72,
73
],
[
75,
76
],
[
78,
79
]
] | [
"n=int(input())\na=sorted(list(map(int,input().split())),reverse=True)\nans=0\nc=0\nfor i in range(0,len(a),2):\n if c>n:\n break\n #print(a[i],a[i+1],min(a[i],a[i+1]))\n ans+=min(a[i],a[i+1])\n c+=1\nprint(ans)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"a=sorted(list(map(int,input().split())),reverse=True)",
"a",
"sorted(list(map(int,input().split())),reverse=True)",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"reverse=True",
"reverse",
"True",
"ans=0",
"ans",
"0",
"c=0",
"c",
"0",
"for i in range(0,len(a),2):\n if c>n:\n break\n #print(a[i],a[i+1],min(a[i],a[i+1]))\n ans+=min(a[i],a[i+1])\n c+=1",
"i",
"range(0,len(a),2)",
"range",
"0",
"len(a)",
"len",
"a",
"2",
"if c>n:\n break\n #print(a[i],a[i+1],min(a[i],a[i+1]))\n ",
"c>n",
"c",
"n",
"break",
"ans+=min(a[i],a[i+1])",
"ans",
"min(a[i],a[i+1])",
"min",
"a[i]",
"a",
"i",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"c+=1",
"c",
"1",
"print(ans)",
"print",
"ans",
"ans+=min(a[i],a[i+1])",
"min(a[i],a[i+1])",
"ans",
"c+=1",
"1",
"c",
"ans=0",
"0",
"ans",
"a=sorted(list(map(int,input().split())),reverse=True)",
"sorted(list(map(int,input().split())),reverse=True)",
"a",
"c=0",
"0",
"c",
"n=int(input())",
"int(input())",
"n"
] | n=int(input())
a=sorted(list(map(int,input().split())),reverse=True)
ans=0
c=0
for i in range(0,len(a),2):
if c>n:
break
#print(a[i],a[i+1],min(a[i],a[i+1]))
ans+=min(a[i],a[i+1])
c+=1
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
4,
13,
18,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
39,
17,
10,
4,
13
] | [
[
25,
2
],
[
25,
26
]
] | [
"_=input()\nprint(sum(sorted(list(map(int,input().split())))[::2]))",
"_=input()",
"_",
"input()",
"input",
"print(sum(sorted(list(map(int,input().split())))[::2]))",
"print",
"sum(sorted(list(map(int,input().split())))[::2])",
"sum",
"sorted(list(map(int,input().split())))[::2]",
"(list(map(int,input().split())))",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"::2",
"2",
"_=input()",
"input()",
"_"
] | _=input()
print(sum(sorted(list(map(int,input().split())))[::2])) |
[
7,
0,
13,
4,
13,
4,
13,
4,
13,
4,
13,
13,
10,
4,
13
] | [
[
13,
2
],
[
13,
14
]
] | [
"N = int(input())\nprint(sum(l for l in sorted(list(map(int,input().split())),reverse=True)[1::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"print(sum(l for l in sorted(list(map(int,input().split())),reverse=True)[1::2]))",
"print",
"sum(l for l in sorted(list(map(int,input().split())),reverse=True)[1::2])",
"sum",
"l",
"N = int(input())",
"int(input())",
"N"
] | N = int(input())
print(sum(l for l in sorted(list(map(int,input().split())),reverse=True)[1::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
38,
2
],
[
35,
8
],
[
36,
21
],
[
41,
24
],
[
28,
27
],
[
39,
30
],
[
42,
33
],
[
35,
36
],
[
38,
39
],
[
41,
42
]
] | [
"n = int(input()); a = list(map(int, input().split()))\na.sort(); b = 0\nfor i in range(n): b += a[2*i]\nprint(b)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"a = list(map(int, input().split()))",
"a",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"a.sort()",
"a.sort",
"a",
"sort",
"b = 0",
"b",
"0",
"for i in range(n): b += a[2*i]",
"i",
"range(n)",
"range",
"n",
"print(b)",
"print",
"b",
"a = list(map(int, input().split()))",
"list(map(int, input().split()))",
"a",
"n = int(input())",
"int(input())",
"n",
"b = 0",
"0",
"b"
] | n = int(input()); a = list(map(int, input().split()))
a.sort(); b = 0
for i in range(n): b += a[2*i]
print(b) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
41,
28,
13,
13,
4,
13,
13,
2,
2,
13,
17,
17,
4,
13,
0,
13,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
4,
13
] | [
[
52,
2
],
[
46,
8
],
[
47,
21
],
[
47,
29
],
[
49,
38
],
[
50,
44
],
[
46,
47
],
[
49,
50
],
[
52,
53
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl.sort()\nans = [j for i,j in enumerate(l) if i%2 == 0]\nprint(sum(ans))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"j for i,j in enumerate(l) if i%2 == 0",
"for i,j in enumerate(l) if i%2 == 0",
"i",
"j",
"enumerate(l)",
"enumerate",
"l",
"i%2 == 0",
"i%2",
"i",
"2",
"0",
"if i%2 == 0",
"j",
"ans = [j for i,j in enumerate(l) if i%2 == 0]",
"ans",
"[j for i,j in enumerate(l) if i%2 == 0]",
"print(sum(ans))",
"print",
"sum(ans)",
"sum",
"ans",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"ans = [j for i,j in enumerate(l) if i%2 == 0]",
"[j for i,j in enumerate(l) if i%2 == 0]",
"ans",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = [j for i,j in enumerate(l) if i%2 == 0]
print(sum(ans))
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
39,
28,
13,
4,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
39,
13
] | [
[
52,
2
],
[
55,
8
],
[
56,
21
],
[
58,
24
],
[
28,
27
],
[
53,
32
],
[
27,
36
],
[
59,
41
],
[
56,
44
],
[
27,
45
],
[
59,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"n = int(input())\nli = list(map(int, input().split()))\n\nli.sort()\nli1 = []\n\nfor i in range(2*n):\n if i%2==0:\n li1.append(li[i])\nprint(sum(li1))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"li = list(map(int, input().split()))",
"li",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"li.sort()",
"li.sort",
"li",
"sort",
"li1 = []",
"li1",
"[]",
"for i in range(2*n):\n if i%2==0:\n li1.append(li[i])",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if i%2==0:\n li1.append(li[i])",
"i%2==0",
"i%2",
"i",
"2",
"0",
"li1.append(li[i])",
"li1.append",
"li1",
"append",
"li[i]",
"li",
"i",
"print(sum(li1))",
"print",
"sum(li1)",
"sum",
"li1",
"n = int(input())",
"int(input())",
"n",
"li = list(map(int, input().split()))",
"list(map(int, input().split()))",
"li",
"li1 = []",
"[]",
"li1"
] | n = int(input())
li = list(map(int, input().split()))
li.sort()
li1 = []
for i in range(2*n):
if i%2==0:
li1.append(li[i])
print(sum(li1)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
2,
13,
18,
13,
13,
4,
13,
13,
10,
17,
13,
10,
2,
13,
10,
4,
13,
10,
4,
13
] | [
[
56,
2
],
[
59,
8
],
[
60,
21
],
[
50,
24
],
[
28,
27
],
[
60,
32
],
[
27,
36
],
[
53,
40
],
[
51,
42
],
[
54,
42
],
[
60,
44
],
[
27,
45
],
[
54,
48
],
[
51,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
],
[
59,
60
]
] | [
"k = int(input())\nli= list(map(int, input().split()))\nli.sort()\nsum=0\nfor k in range(len(li)):\n \n if k%2==0:\n \n sum=sum+li[k]\n \nprint(sum)",
"k = int(input())",
"k",
"int(input())",
"int",
"input()",
"input",
"li= list(map(int, input().split()))",
"li",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"li.sort()",
"li.sort",
"li",
"sort",
"sum=0",
"sum",
"0",
"for k in range(len(li)):\n \n if k%2==0:\n \n sum=sum+li[k]\n ",
"k",
"range(len(li))",
"range",
"len(li)",
"len",
"li",
"if k%2==0:\n \n sum=sum+li[k]\n ",
"k%2==0",
"k%2",
"k",
"2",
"0",
"sum=sum+li[k]",
"sum",
"sum+li[k]",
"sum",
"li[k]",
"li",
"k",
"print(sum)",
"print",
"sum",
"sum=0",
"0",
"sum",
"sum=sum+li[k]",
"sum+li[k]",
"sum",
"k = int(input())",
"int(input())",
"k",
"li= list(map(int, input().split()))",
"list(map(int, input().split()))",
"li"
] | 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)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
2,
17,
13,
17,
17,
0,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
51,
2
],
[
54,
8
],
[
55,
21
],
[
48,
24
],
[
28,
27
],
[
52,
34
],
[
57,
38
],
[
55,
40
],
[
27,
42
],
[
58,
46
],
[
49,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nL.sort()\nS = 0\nfor i in range (1, 2*N+1, 2):\n S += L[i-1]\nprint(S)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"S = 0",
"S",
"0",
"for i in range (1, 2*N+1, 2):\n S += L[i-1]",
"i",
"range (1, 2*N+1, 2)",
"range",
"1",
"2*N+1",
"2*N",
"2",
"N",
"1",
"2",
"S += L[i-1]",
"S",
"L[i-1]",
"L",
"i-1",
"i",
"1",
"print(S)",
"print",
"S",
"S = 0",
"0",
"S",
"N = int(input())",
"int(input())",
"N",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"S += L[i-1]",
"L[i-1]",
"S"
] | N = int(input())
L = list(map(int, input().split()))
L.sort()
S = 0
for i in range (1, 2*N+1, 2):
S += L[i-1]
print(S) |
[
7,
12,
13,
15,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
4,
18,
4,
13,
13,
17,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
13,
17,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
7,
6
],
[
14,
13
],
[
6,
19
],
[
24,
23
],
[
6,
34
],
[
23,
40
],
[
44,
43
],
[
47,
46
],
[
13,
51
],
[
56,
55
],
[
23,
59
],
[
46,
60
],
[
23,
62
],
[
46,
64
],
[
55,
68
],
[
43,
68
],
[
77,
74
]
] | [
"def slove():\n import sys\n input = sys.stdin.readline\n n = int(input().rstrip('\\n'))\n l = list(map(int, input().rstrip('\\n').split()))\n l.sort()\n cnt = 0\n for i in range(0, n * 2, 2):\n cnt += min(l[i], l[i+1])\n print(cnt)\n\n\nif __name__ == '__main__':\n slove()",
"def slove():\n import sys\n input = sys.stdin.readline\n n = int(input().rstrip('\\n'))\n l = list(map(int, input().rstrip('\\n').split()))\n l.sort()\n cnt = 0\n for i in range(0, n * 2, 2):\n cnt += min(l[i], l[i+1])\n print(cnt)",
"slove",
"import sys",
"sys",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"n = int(input().rstrip('\\n'))",
"n",
"int(input().rstrip('\\n'))",
"int",
"input().rstrip('\\n')",
"().rstrip",
"()",
"input",
"rstrip",
"'\\n'",
"l = list(map(int, input().rstrip('\\n').split()))",
"l",
"list(map(int, input().rstrip('\\n').split()))",
"list",
"map(int, input().rstrip('\\n').split())",
"map",
"int",
"input().rstrip('\\n').split()",
"().rstrip('\\n').split",
"().rstrip('\\n')",
"().rstrip",
"()",
"input",
"rstrip",
"'\\n'",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"cnt = 0",
"cnt",
"0",
"for i in range(0, n * 2, 2):\n cnt += min(l[i], l[i+1])\n ",
"i",
"range(0, n * 2, 2)",
"range",
"0",
"n * 2",
"n",
"2",
"2",
"cnt += min(l[i], l[i+1])",
"cnt",
"min(l[i], l[i+1])",
"min",
"l[i]",
"l",
"i",
"l[i+1]",
"l",
"i+1",
"i",
"1",
"print(cnt)",
"print",
"cnt",
"if __name__ == '__main__':\n slove()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"slove()",
"slove",
"def slove():\n import sys\n input = sys.stdin.readline\n n = int(input().rstrip('\\n'))\n l = list(map(int, input().rstrip('\\n').split()))\n l.sort()\n cnt = 0\n for i in range(0, n * 2, 2):\n cnt += min(l[i], l[i+1])\n print(cnt)",
"def slove():\n import sys\n input = sys.stdin.readline\n n = int(input().rstrip('\\n'))\n l = list(map(int, input().rstrip('\\n').split()))\n l.sort()\n cnt = 0\n for i in range(0, n * 2, 2):\n cnt += min(l[i], l[i+1])\n print(cnt)",
"slove"
] | def slove():
import sys
input = sys.stdin.readline
n = int(input().rstrip('\n'))
l = list(map(int, input().rstrip('\n').split()))
l.sort()
cnt = 0
for i in range(0, n * 2, 2):
cnt += min(l[i], l[i+1])
print(cnt)
if __name__ == '__main__':
slove()
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
41,
28,
13,
4,
13,
13,
4,
18,
13,
2,
17,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
42,
2
],
[
45,
8
],
[
48,
20
],
[
46,
23
],
[
27,
26
],
[
43,
29
],
[
49,
32
],
[
46,
32
],
[
26,
35
],
[
42,
43
],
[
45,
46
],
[
48,
49
]
] | [
"n=int(input())\nl=list(map(int,input().split()))\nl=sorted(l)\nprint(sum([l[2*i] for i in range(n)]))",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l=list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l=sorted(l)",
"l",
"sorted(l)",
"sorted",
"l",
"l[2*i] for i in range(n)",
"for i in range(n)",
"i",
"range(n)",
"range",
"n",
"for i in range(n)",
"l[2*i]",
"l",
"2*i",
"2",
"i",
"print(sum([l[2*i] for i in range(n)]))",
"print",
"sum([l[2*i] for i in range(n)])",
"sum",
"[l[2*i] for i in range(n)]",
"n=int(input())",
"int(input())",
"n",
"l=list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"l=sorted(l)",
"sorted(l)",
"l"
] | n=int(input())
l=list(map(int,input().split()))
l=sorted(l)
print(sum([l[2*i] for i in range(n)])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
18,
4,
13,
13,
0,
13,
39,
0,
13,
17,
28,
13,
13,
4,
18,
13,
13,
4,
13,
13,
42,
40,
13,
39,
4,
18,
13,
13,
4,
13,
13,
0,
13,
4,
13,
13,
4,
18,
13,
13,
4,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
39,
13,
10,
4,
13,
10,
4,
13
] | [
[
69,
2
],
[
66,
8
],
[
63,
15
],
[
57,
18
],
[
22,
21
],
[
67,
21
],
[
64,
25
],
[
21,
29
],
[
64,
32
],
[
64,
36
],
[
64,
40
],
[
60,
42
],
[
64,
45
],
[
64,
48
],
[
64,
52
],
[
61,
55
],
[
58,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
],
[
66,
67
],
[
69,
70
]
] | [
"a = int(input())\ns = input().split()\nd = []\nm = 0\nfor i in s:\n d.append(int(i))\nwhile d != []:\n d.remove(max(d))\n m += max(d)\n d.remove(max(d))\nprint(m)",
"a = int(input())",
"a",
"int(input())",
"int",
"input()",
"input",
"s = input().split()",
"s",
"input().split()",
"().split",
"()",
"input",
"split",
"d = []",
"d",
"[]",
"m = 0",
"m",
"0",
"for i in s:\n d.append(int(i))",
"i",
"s",
"d.append(int(i))",
"d.append",
"d",
"append",
"int(i)",
"int",
"i",
"while d != []:\n d.remove(max(d))\n m += max(d)\n d.remove(max(d))",
"d != []",
"d",
"[]",
"d.remove(max(d))",
"d.remove",
"d",
"remove",
"max(d)",
"max",
"d",
"m += max(d)",
"m",
"max(d)",
"max",
"d",
"d.remove(max(d))",
"d.remove",
"d",
"remove",
"max(d)",
"max",
"d",
"print(m)",
"print",
"m",
"m = 0",
"0",
"m",
"m += max(d)",
"max(d)",
"m",
"d = []",
"[]",
"d",
"s = input().split()",
"input().split()",
"s",
"a = int(input())",
"int(input())",
"a"
] | a = int(input())
s = input().split()
d = []
m = 0
for i in s:
d.append(int(i))
while d != []:
d.remove(max(d))
m += max(d)
d.remove(max(d))
print(m)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
55,
2
],
[
58,
8
],
[
61,
20
],
[
59,
23
],
[
52,
25
],
[
29,
28
],
[
62,
33
],
[
59,
33
],
[
28,
37
],
[
49,
41
],
[
62,
43
],
[
59,
43
],
[
28,
44
],
[
50,
47
],
[
53,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
],
[
61,
62
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl = sorted(l)\nans = 0\nfor i in range(len(l)):\n if i%2==0:\n ans += l[i]\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l = sorted(l)",
"l",
"sorted(l)",
"sorted",
"l",
"ans = 0",
"ans",
"0",
"for i in range(len(l)):\n if i%2==0:\n ans += l[i]",
"i",
"range(len(l))",
"range",
"len(l)",
"len",
"l",
"if i%2==0:\n ans += l[i]",
"i%2==0",
"i%2",
"i",
"2",
"0",
"ans += l[i]",
"ans",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"ans += l[i]",
"l[i]",
"ans",
"ans = 0",
"0",
"ans",
"n = int(input())",
"int(input())",
"n",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"l = sorted(l)",
"sorted(l)",
"l"
] | n = int(input())
l = list(map(int,input().split()))
l = sorted(l)
ans = 0
for i in range(len(l)):
if i%2==0:
ans += l[i]
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13
] | [
[
42,
2
],
[
51,
8
],
[
45,
22
],
[
26,
25
],
[
43,
31
],
[
48,
34
],
[
52,
36
],
[
25,
37
],
[
49,
40
],
[
46,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"n = int(input())\nl = sorted(list(map(int,input().split())))\nans = 0\nfor i in range(0,2*n,2):\n ans += l[i]\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = sorted(list(map(int,input().split())))",
"l",
"sorted(list(map(int,input().split())))",
"sorted",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"ans = 0",
"ans",
"0",
"for i in range(0,2*n,2):\n ans += l[i]",
"i",
"range(0,2*n,2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"ans += l[i]",
"ans",
"l[i]",
"l",
"i",
"print(ans)",
"print",
"ans",
"n = int(input())",
"int(input())",
"n",
"ans = 0",
"0",
"ans",
"ans += l[i]",
"l[i]",
"ans",
"l = sorted(list(map(int,input().split())))",
"sorted(list(map(int,input().split())))",
"l"
] | n = int(input())
l = sorted(list(map(int,input().split())))
ans = 0
for i in range(0,2*n,2):
ans += l[i]
print(ans) |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
4,
13,
18,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
18,
13,
10,
12,
13
] | [
[
51,
4
],
[
14,
13
],
[
52,
17
],
[
20,
19
],
[
52,
28
],
[
19,
32
],
[
36,
35
],
[
19,
39
],
[
35,
43
],
[
55,
49
],
[
51,
52
]
] | [
"import sys\n\ninput = sys.stdin.readline\n\n\ndef main():\n N = int(input())\n L = list(map(int, input().split()))\n\n L.sort()\n ans = sum(L[i] for i in range(0, 2 * N, 2))\n\n print(ans)\n\n\nif __name__ == \"__main__\":\n main()",
"import sys",
"sys",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"def main():\n N = int(input())\n L = list(map(int, input().split()))\n\n L.sort()\n ans = sum(L[i] for i in range(0, 2 * N, 2))\n\n print(ans)",
"main",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = sum(L[i] for i in range(0, 2 * N, 2))",
"ans",
"sum(L[i] for i in range(0, 2 * N, 2))",
"sum",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"if __name__ == \"__main__\":\n main()",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"main()",
"main",
"input = sys.stdin.readline",
"sys.stdin.readline",
"input",
"def main():\n N = int(input())\n L = list(map(int, input().split()))\n\n L.sort()\n ans = sum(L[i] for i in range(0, 2 * N, 2))\n\n print(ans)",
"def main():\n N = int(input())\n L = list(map(int, input().split()))\n\n L.sort()\n ans = sum(L[i] for i in range(0, 2 * N, 2))\n\n print(ans)",
"main"
] | import sys
input = sys.stdin.readline
def main():
N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = sum(L[i] for i in range(0, 2 * N, 2))
print(ans)
if __name__ == "__main__":
main()
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
48,
2
],
[
45,
8
],
[
46,
21
],
[
42,
24
],
[
28,
27
],
[
49,
30
],
[
51,
32
],
[
46,
34
],
[
27,
37
],
[
52,
40
],
[
43,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"n=int(input())\nl=list(map(int,input().split()))\nl.sort()\nans=0\nfor _ in range(n):\n ans+=l[2*_]\nprint(ans)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l=list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"ans=0",
"ans",
"0",
"for _ in range(n):\n ans+=l[2*_]",
"_",
"range(n)",
"range",
"n",
"ans+=l[2*_]",
"ans",
"l[2*_]",
"l",
"2*_",
"2",
"_",
"print(ans)",
"print",
"ans",
"ans=0",
"0",
"ans",
"l=list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"n=int(input())",
"int(input())",
"n",
"ans+=l[2*_]",
"l[2*_]",
"ans"
] | n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
for _ in range(n):
ans+=l[2*_]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
17,
10,
4,
13,
10,
4,
13
] | [
[
29,
2
],
[
32,
8
],
[
33,
24
],
[
29,
30
],
[
32,
33
]
] | [
"a = int(input())\nb = sorted(map(int,input().split()))\nprint(sum(b[0::2]))",
"a = int(input())",
"a",
"int(input())",
"int",
"input()",
"input",
"b = sorted(map(int,input().split()))",
"b",
"sorted(map(int,input().split()))",
"sorted",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"print(sum(b[0::2]))",
"print",
"sum(b[0::2])",
"sum",
"b[0::2]",
"b",
"0::2",
"0",
"2",
"a = int(input())",
"int(input())",
"a",
"b = sorted(map(int,input().split()))",
"sorted(map(int,input().split()))",
"b"
] | a = int(input())
b = sorted(map(int,input().split()))
print(sum(b[0::2])) |
[
7,
12,
13,
15,
13,
0,
13,
18,
18,
13,
13,
13,
4,
18,
13,
13,
2,
17,
17,
15,
15,
15,
15,
15,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
4,
18,
13,
13,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
7,
6
],
[
27,
26
],
[
6,
30
],
[
33,
32
],
[
6,
41
],
[
45,
44
],
[
32,
48
],
[
52,
51
],
[
26,
57
],
[
61,
60
],
[
32,
62
],
[
51,
63
],
[
60,
66
],
[
44,
66
],
[
75,
72
]
] | [
"def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n n = int(input())\n l = list(map(int, input().split()))\n res = 0\n l.sort()\n for i in range(0, 2*n, 2):\n res += l[i]\n print(res)\n\nif __name__ == '__main__':\n main()",
"def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n n = int(input())\n l = list(map(int, input().split()))\n res = 0\n l.sort()\n for i in range(0, 2*n, 2):\n res += l[i]\n print(res)",
"main",
"import sys",
"sys",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"sys.setrecursionlimit(10**7)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10**7",
"10",
"7",
"from collections import Counter, deque",
"from itertools import combinations, permutations, accumulate, groupby, product",
"from bisect import bisect_left,bisect_right",
"from heapq import heapify, heappop, heappush",
"import math",
"math",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int, input().split()))",
"l",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"res = 0",
"res",
"0",
"l.sort()",
"l.sort",
"l",
"sort",
"for i in range(0, 2*n, 2):\n res += l[i]\n ",
"i",
"range(0, 2*n, 2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"res += l[i]",
"res",
"l[i]",
"l",
"i",
"print(res)",
"print",
"res",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n n = int(input())\n l = list(map(int, input().split()))\n res = 0\n l.sort()\n for i in range(0, 2*n, 2):\n res += l[i]\n print(res)",
"def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n n = int(input())\n l = list(map(int, input().split()))\n res = 0\n l.sort()\n for i in range(0, 2*n, 2):\n res += l[i]\n print(res)",
"main"
] | def main():
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
import math
#from math import gcd
#inf = 10**17
#mod = 10**9 + 7
n = int(input())
l = list(map(int, input().split()))
res = 0
l.sort()
for i in range(0, 2*n, 2):
res += l[i]
print(res)
if __name__ == '__main__':
main() |
[
7,
15,
13,
15,
13,
0,
13,
18,
18,
18,
13,
13,
13,
13,
0,
13,
18,
18,
18,
13,
13,
13,
13,
0,
13,
18,
18,
18,
13,
13,
13,
13,
0,
13,
18,
4,
18,
13,
13,
4,
18,
4,
13,
13,
18,
13,
13,
39,
17,
4,
18,
13,
13,
0,
13,
4,
18,
18,
13,
39,
17,
13,
4,
13,
13,
10,
18,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
18,
13
] | [
[
78,
6
],
[
66,
15
],
[
75,
24
],
[
69,
33
],
[
79,
42
],
[
70,
51
],
[
72,
54
],
[
70,
58
],
[
73,
64
],
[
66,
67
],
[
69,
70
],
[
72,
73
],
[
75,
76
],
[
78,
79
]
] | [
"import sys\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nL = np.array(read().split(), np.int32)[1:]\n\nL.sort()\nx = L[::2].sum()\nprint(x)",
"import sys",
"sys",
"import numpy as np",
"numpy",
"read = sys.stdin.buffer.read",
"read",
"sys.stdin.buffer.read",
"sys.stdin.buffer",
"sys.stdin",
"sys",
"stdin",
"buffer",
"read",
"readline = sys.stdin.buffer.readline",
"readline",
"sys.stdin.buffer.readline",
"sys.stdin.buffer",
"sys.stdin",
"sys",
"stdin",
"buffer",
"readline",
"readlines = sys.stdin.buffer.readlines",
"readlines",
"sys.stdin.buffer.readlines",
"sys.stdin.buffer",
"sys.stdin",
"sys",
"stdin",
"buffer",
"readlines",
"L = np.array(read().split(), np.int32)[1:]",
"L",
"np.array(read().split(), np.int32)[1:]",
"np.array(read().split(), np.int32)",
"np.array",
"np",
"array",
"read().split()",
"().split",
"()",
"read",
"split",
"np.int32",
"np",
"int32",
"1:",
"1",
"L.sort()",
"L.sort",
"L",
"sort",
"x = L[::2].sum()",
"x",
"L[::2].sum()",
"[::2].sum",
"[::2]",
"L",
"::2",
"2",
"sum",
"print(x)",
"print",
"x",
"readline = sys.stdin.buffer.readline",
"sys.stdin.buffer.readline",
"readline",
"L = np.array(read().split(), np.int32)[1:]",
"np.array(read().split(), np.int32)[1:]",
"L",
"x = L[::2].sum()",
"L[::2].sum()",
"x",
"readlines = sys.stdin.buffer.readlines",
"sys.stdin.buffer.readlines",
"readlines",
"read = sys.stdin.buffer.read",
"sys.stdin.buffer.read",
"read"
] | import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
L = np.array(read().split(), np.int32)[1:]
L.sort()
x = L[::2].sum()
print(x) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
13,
13,
10,
4,
13,
10,
18,
13
] | [
[
51,
2
],
[
10,
9
],
[
9,
18
],
[
48,
20
],
[
49,
24
],
[
45,
27
],
[
31,
30
],
[
52,
33
],
[
54,
35
],
[
49,
37
],
[
30,
39
],
[
55,
43
],
[
46,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
]
] | [
"n = int(input())\nl = [int(i) for i in input().split()]\nl.sort()\nans = 0\nfor i in range(n):\n ans += l[i*2]\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"l = [int(i) for i in input().split()]",
"l",
"[int(i) for i in input().split()]",
"l.sort()",
"l.sort",
"l",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(n):\n ans += l[i*2]",
"i",
"range(n)",
"range",
"n",
"ans += l[i*2]",
"ans",
"l[i*2]",
"l",
"i*2",
"i",
"2",
"print(ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"l = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"l",
"n = int(input())",
"int(input())",
"n",
"ans += l[i*2]",
"l[i*2]",
"ans"
] | n = int(input())
l = [int(i) for i in input().split()]
l.sort()
ans = 0
for i in range(n):
ans += l[i*2]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
39,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
13,
4,
18,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
13,
13,
13,
14,
2,
13,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
28,
13,
4,
13,
13,
0,
13,
18,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
39,
13,
10,
4,
13
] | [
[
84,
2
],
[
96,
8
],
[
93,
20
],
[
78,
23
],
[
27,
26
],
[
85,
29
],
[
87,
31
],
[
97,
34
],
[
97,
37
],
[
88,
39
],
[
81,
41
],
[
97,
44
],
[
97,
47
],
[
82,
49
],
[
88,
52
],
[
82,
53
],
[
94,
56
],
[
88,
58
],
[
94,
61
],
[
82,
63
],
[
66,
65
],
[
85,
68
],
[
90,
70
],
[
94,
72
],
[
65,
73
],
[
91,
76
],
[
79,
76
],
[
78,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\nvlist = []\nans = 0\n\nfor i in range(N):\n a = max(L)\n L.remove(a)\n b = max(L)\n L.remove(b)\n if a < b:\n vlist.append(a)\n else:\n vlist.append(b)\n\nfor i in range(N):\n ans += vlist[i]\n \nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"vlist = []",
"vlist",
"[]",
"ans = 0",
"ans",
"0",
"for i in range(N):\n a = max(L)\n L.remove(a)\n b = max(L)\n L.remove(b)\n if a < b:\n vlist.append(a)\n else:\n vlist.append(b)",
"i",
"range(N)",
"range",
"N",
"a = max(L)",
"a",
"max(L)",
"max",
"L",
"L.remove(a)",
"L.remove",
"L",
"remove",
"a",
"b = max(L)",
"b",
"max(L)",
"max",
"L",
"L.remove(b)",
"L.remove",
"L",
"remove",
"b",
"if a < b:\n vlist.append(a)\n else:\n vlist.append(b)",
"a < b",
"a",
"b",
"vlist.append(a)",
"vlist.append",
"vlist",
"append",
"a",
"vlist.append(b)",
"vlist.append",
"vlist",
"append",
"b",
"for i in range(N):\n ans += vlist[i]\n ",
"i",
"range(N)",
"range",
"N",
"ans += vlist[i]",
"ans",
"vlist[i]",
"vlist",
"i",
"print(ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"b = max(L)",
"max(L)",
"b",
"N = int(input())",
"int(input())",
"N",
"a = max(L)",
"max(L)",
"a",
"ans += vlist[i]",
"vlist[i]",
"ans",
"vlist = []",
"[]",
"vlist",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L"
] | N = int(input())
L = list(map(int, input().split()))
vlist = []
ans = 0
for i in range(N):
a = max(L)
L.remove(a)
b = max(L)
L.remove(b)
if a < b:
vlist.append(a)
else:
vlist.append(b)
for i in range(N):
ans += vlist[i]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
50,
2
],
[
47,
8
],
[
48,
21
],
[
53,
24
],
[
28,
27
],
[
48,
33
],
[
44,
36
],
[
48,
38
],
[
27,
39
],
[
45,
42
],
[
54,
42
],
[
44,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
]
] | [
"N = int(input())\nL = list(map(int, input().split()))\n\nL.sort()\nans = 0\nfor i in range(0, len(L), 2):\n ans += L[i]\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0, len(L), 2):\n ans += L[i]",
"i",
"range(0, len(L), 2)",
"range",
"0",
"len(L)",
"len",
"L",
"2",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"ans += L[i]",
"L[i]",
"ans",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"N = int(input())",
"int(input())",
"N",
"ans = 0",
"0",
"ans"
] | N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for i in range(0, len(L), 2):
ans += L[i]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
39,
28,
13,
4,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
39,
13
] | [
[
55,
2
],
[
52,
8
],
[
53,
21
],
[
58,
24
],
[
28,
27
],
[
56,
32
],
[
27,
36
],
[
59,
41
],
[
53,
44
],
[
27,
45
],
[
59,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl.sort()\n\na = []\n\nfor i in range(2*n):\n if i % 2 == 0:\n a.append(l[i])\n\n#print(a)\nprint(sum(a))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"a = []",
"a",
"[]",
"for i in range(2*n):\n if i % 2 == 0:\n a.append(l[i])\n\n#print(a)",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if i % 2 == 0:\n a.append(l[i])\n\n#print(a)",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"a.append(l[i])",
"a.append",
"a",
"append",
"l[i]",
"l",
"i",
"print(sum(a))",
"print",
"sum(a)",
"sum",
"a",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"n = int(input())",
"int(input())",
"n",
"a = []",
"[]",
"a"
] | n = int(input())
l = list(map(int,input().split()))
l.sort()
a = []
for i in range(2*n):
if i % 2 == 0:
a.append(l[i])
#print(a)
print(sum(a))
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
18,
4,
13,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
0,
18,
13,
13,
4,
13,
18,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
18,
13,
13,
14,
2,
13,
18,
13,
2,
13,
17,
0,
13,
18,
13,
2,
13,
17,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13,
10,
18,
13,
10,
18,
13
] | [
[
81,
2
],
[
75,
8
],
[
17,
16
],
[
76,
22
],
[
27,
24
],
[
76,
25
],
[
16,
26
],
[
24,
29
],
[
76,
30
],
[
16,
31
],
[
76,
34
],
[
78,
37
],
[
41,
40
],
[
76,
46
],
[
90,
49
],
[
24,
50
],
[
76,
51
],
[
40,
52
],
[
91,
55
],
[
88,
55
],
[
76,
57
],
[
40,
59
],
[
87,
62
],
[
76,
64
],
[
40,
66
],
[
84,
69
],
[
88,
70
],
[
91,
70
],
[
85,
73
],
[
79,
73
],
[
75,
76
],
[
78,
79
],
[
81,
82
],
[
88,
84
],
[
91,
84
],
[
84,
85
],
[
87,
88
],
[
24,
90
],
[
90,
91
]
] | [
"N = int(input())\nL = input().split(\" \")\nfor i in range(0, len(L)):\n L[i] = int(L[i])\nL.sort()\n\nans = 0\nfor i in range(0, len(L), 2):\n tmp = L[i]\n if tmp > L[i+1]:\n tmp = L[i+1]\n ans += tmp\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = input().split(\" \")",
"L",
"input().split(\" \")",
"().split",
"()",
"input",
"split",
"\" \"",
"for i in range(0, len(L)):\n L[i] = int(L[i])",
"i",
"range(0, len(L))",
"range",
"0",
"len(L)",
"len",
"L",
"L[i] = int(L[i])",
"L[i]",
"L",
"i",
"int(L[i])",
"int",
"L[i]",
"L",
"i",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0, len(L), 2):\n tmp = L[i]\n if tmp > L[i+1]:\n tmp = L[i+1]\n ans += tmp",
"i",
"range(0, len(L), 2)",
"range",
"0",
"len(L)",
"len",
"L",
"2",
"tmp = L[i]",
"tmp",
"L[i]",
"L",
"i",
"if tmp > L[i+1]:\n tmp = L[i+1]\n ",
"tmp > L[i+1]",
"tmp",
"L[i+1]",
"L",
"i+1",
"i",
"1",
"tmp = L[i+1]",
"tmp",
"L[i+1]",
"L",
"i+1",
"i",
"1",
"ans += tmp",
"ans",
"tmp",
"print(ans)",
"print",
"ans",
"L = input().split(\" \")",
"input().split(\" \")",
"L",
"ans = 0",
"0",
"ans",
"N = int(input())",
"int(input())",
"N",
"ans += tmp",
"tmp",
"ans",
"tmp = L[i+1]",
"L[i+1]",
"tmp",
"tmp = L[i]",
"L[i]",
"tmp"
] | N = int(input())
L = input().split(" ")
for i in range(0, len(L)):
L[i] = int(L[i])
L.sort()
ans = 0
for i in range(0, len(L), 2):
tmp = L[i]
if tmp > L[i+1]:
tmp = L[i+1]
ans += tmp
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
17,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
49,
2
],
[
10,
9
],
[
9,
18
],
[
46,
20
],
[
52,
25
],
[
29,
28
],
[
50,
31
],
[
43,
33
],
[
47,
35
],
[
28,
38
],
[
44,
41
],
[
53,
41
],
[
43,
44
],
[
46,
47
],
[
49,
50
],
[
52,
53
]
] | [
"n=int(input())\nl=sorted([int(i) for i in input().split()])\nc=0\nfor i in range(n):\n c+=l[2*i]\nprint(c)",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
"int(i)",
"int",
"i",
"l=sorted([int(i) for i in input().split()])",
"l",
"sorted([int(i) for i in input().split()])",
"sorted",
"[int(i) for i in input().split()]",
"c=0",
"c",
"0",
"for i in range(n):\n c+=l[2*i]",
"i",
"range(n)",
"range",
"n",
"c+=l[2*i]",
"c",
"l[2*i]",
"l",
"2*i",
"2",
"i",
"print(c)",
"print",
"c",
"c+=l[2*i]",
"l[2*i]",
"c",
"l=sorted([int(i) for i in input().split()])",
"sorted([int(i) for i in input().split()])",
"l",
"n=int(input())",
"int(input())",
"n",
"c=0",
"0",
"c"
] | n=int(input())
l=sorted([int(i) for i in input().split()])
c=0
for i in range(n):
c+=l[2*i]
print(c)
|
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
4,
13,
13,
4,
13,
4,
13,
18,
13,
39,
17,
10,
4,
13,
10,
4,
13
] | [
[
36,
2
],
[
10,
9
],
[
9,
18
],
[
33,
20
],
[
34,
29
],
[
33,
34
],
[
36,
37
]
] | [
"N = int(input())\nA = sorted([int(a) for a in input().split()])\nprint(sum(A[::2]))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(a) for a in input().split()",
"for a in input().split()",
"a",
"input().split()",
"().split",
"()",
"input",
"split",
"for a in input().split()",
"int(a)",
"int",
"a",
"A = sorted([int(a) for a in input().split()])",
"A",
"sorted([int(a) for a in input().split()])",
"sorted",
"[int(a) for a in input().split()]",
"print(sum(A[::2]))",
"print",
"sum(A[::2])",
"sum",
"A[::2]",
"A",
"::2",
"2",
"A = sorted([int(a) for a in input().split()])",
"sorted([int(a) for a in input().split()])",
"A",
"N = int(input())",
"int(input())",
"N"
] | N = int(input())
A = sorted([int(a) for a in input().split()])
print(sum(A[::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
17,
13,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
53,
2
],
[
47,
8
],
[
48,
21
],
[
50,
24
],
[
28,
27
],
[
54,
33
],
[
44,
36
],
[
48,
38
],
[
27,
39
],
[
45,
42
],
[
51,
42
],
[
44,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl.sort()\nskewers = 0\nfor i in range(0,2*n,2) :\n skewers += l[i]\n\nprint(skewers)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort()",
"l.sort",
"l",
"sort",
"skewers = 0",
"skewers",
"0",
"for i in range(0,2*n,2) :\n skewers += l[i]",
"i",
"range(0,2*n,2)",
"range",
"0",
"2*n",
"2",
"n",
"2",
"skewers += l[i]",
"skewers",
"l[i]",
"l",
"i",
"print(skewers)",
"print",
"skewers",
"skewers += l[i]",
"l[i]",
"skewers",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l",
"skewers = 0",
"0",
"skewers",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
l = list(map(int,input().split()))
l.sort()
skewers = 0
for i in range(0,2*n,2) :
skewers += l[i]
print(skewers) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
39,
13,
2,
13,
17,
0,
13,
4,
13,
13,
0,
13,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
70,
2
],
[
58,
8
],
[
59,
21
],
[
73,
24
],
[
67,
27
],
[
31,
30
],
[
71,
33
],
[
55,
35
],
[
59,
37
],
[
74,
41
],
[
62,
41
],
[
64,
44
],
[
56,
47
],
[
61,
49
],
[
65,
53
],
[
68,
53
],
[
55,
56
],
[
58,
59
],
[
61,
62
],
[
64,
65
],
[
67,
68
],
[
70,
71
],
[
73,
74
]
] | [
"a = int(input())\nb = list(map(int,input().split()))\nb.sort()\nj = 0\nnum = 0\nfor i in range(a):\n c = b[j:j+2]\n num += min(c)\n j += 2\nprint(num)",
"a = int(input())",
"a",
"int(input())",
"int",
"input()",
"input",
"b = list(map(int,input().split()))",
"b",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"b.sort()",
"b.sort",
"b",
"sort",
"j = 0",
"j",
"0",
"num = 0",
"num",
"0",
"for i in range(a):\n c = b[j:j+2]\n num += min(c)\n j += 2",
"i",
"range(a)",
"range",
"a",
"c = b[j:j+2]",
"c",
"b[j:j+2]",
"b",
"j:j+2",
"j",
"j+2",
"j",
"2",
"num += min(c)",
"num",
"min(c)",
"min",
"c",
"j += 2",
"j",
"2",
"print(num)",
"print",
"num",
"c = b[j:j+2]",
"b[j:j+2]",
"c",
"b = list(map(int,input().split()))",
"list(map(int,input().split()))",
"b",
"j += 2",
"2",
"j",
"num += min(c)",
"min(c)",
"num",
"num = 0",
"0",
"num",
"a = int(input())",
"int(input())",
"a",
"j = 0",
"0",
"j"
] | a = int(input())
b = list(map(int,input().split()))
b.sort()
j = 0
num = 0
for i in range(a):
c = b[j:j+2]
num += min(c)
j += 2
print(num) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
4,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
4,
13
] | [
[
57,
2
],
[
48,
8
],
[
49,
21
],
[
25,
24
],
[
54,
27
],
[
49,
34
],
[
51,
42
],
[
52,
46
],
[
55,
46
],
[
48,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
]
] | [
"n = int(input())\nL = list(map(int, input().split()))\nL.sort(reverse=True)\nans = 0\nfor i, l in enumerate(L):\n if i%2 == 1:\n ans += l\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort(reverse=True)",
"L.sort",
"L",
"sort",
"reverse=True",
"reverse",
"True",
"ans = 0",
"ans",
"0",
"for i, l in enumerate(L):\n if i%2 == 1:\n ans += l",
"i",
"l",
"enumerate(L)",
"enumerate",
"L",
"if i%2 == 1:\n ans += l",
"i%2 == 1",
"i%2",
"i",
"2",
"1",
"ans += l",
"ans",
"l",
"print(ans)",
"print",
"ans",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"ans += l",
"l",
"ans",
"ans = 0",
"0",
"ans",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
ans = 0
for i, l in enumerate(L):
if i%2 == 1:
ans += l
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
45,
2
],
[
48,
8
],
[
49,
21
],
[
42,
24
],
[
28,
27
],
[
46,
30
],
[
51,
32
],
[
49,
34
],
[
27,
36
],
[
52,
40
],
[
43,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
51,
52
]
] | [
"n = int(input())\na = list(map(int, input().split()))\n\na.sort()\n\nans = 0\nfor i in range(n):\n ans += a[i*2]\n\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"a = list(map(int, input().split()))",
"a",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"a.sort()",
"a.sort",
"a",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(n):\n ans += a[i*2]",
"i",
"range(n)",
"range",
"n",
"ans += a[i*2]",
"ans",
"a[i*2]",
"a",
"i*2",
"i",
"2",
"print(ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"n = int(input())",
"int(input())",
"n",
"a = list(map(int, input().split()))",
"list(map(int, input().split()))",
"a",
"ans += a[i*2]",
"a[i*2]",
"ans"
] | n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(n):
ans += a[i*2]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
2,
17,
13,
17,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
60,
2
],
[
66,
8
],
[
63,
20
],
[
67,
23
],
[
54,
25
],
[
29,
28
],
[
61,
35
],
[
57,
39
],
[
64,
43
],
[
67,
43
],
[
28,
44
],
[
64,
46
],
[
67,
46
],
[
28,
48
],
[
58,
52
],
[
55,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
],
[
63,
64
],
[
66,
67
]
] | [
"n = int(input())\nl = list(map(int,input().split()))\nl = sorted(l)\nans = 0\nfor i in range(0,2*n-1,2):\n ans +=min(l[i],l[i+1])\nprint(ans)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l = list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l = sorted(l)",
"l",
"sorted(l)",
"sorted",
"l",
"ans = 0",
"ans",
"0",
"for i in range(0,2*n-1,2):\n ans +=min(l[i],l[i+1])",
"i",
"range(0,2*n-1,2)",
"range",
"0",
"2*n-1",
"2*n",
"2",
"n",
"1",
"2",
"ans +=min(l[i],l[i+1])",
"ans",
"min(l[i],l[i+1])",
"min",
"l[i]",
"l",
"i",
"l[i+1]",
"l",
"i+1",
"i",
"1",
"print(ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"ans +=min(l[i],l[i+1])",
"min(l[i],l[i+1])",
"ans",
"n = int(input())",
"int(input())",
"n",
"l = sorted(l)",
"sorted(l)",
"l",
"l = list(map(int,input().split()))",
"list(map(int,input().split()))",
"l"
] | n = int(input())
l = list(map(int,input().split()))
l = sorted(l)
ans = 0
for i in range(0,2*n-1,2):
ans +=min(l[i],l[i+1])
print(ans) |
[
7,
12,
13,
4,
18,
13,
13,
29,
4,
13,
18,
13,
39,
17,
17,
23,
13,
23,
13,
14,
2,
13,
17,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
4,
13,
13,
13,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
4,
13,
10,
12,
13
] | [
[
18,
5
],
[
18,
11
],
[
16,
16
],
[
18,
18
],
[
60,
24
],
[
32,
31
],
[
31,
40
],
[
54,
42
],
[
57,
45
],
[
64,
47
],
[
61,
48
],
[
55,
49
],
[
58,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"def BBQ_easy(N: int, L: list)->int:\n L.sort()\n return sum(L[0::2])\n\n\nif __name__ == \"__main__\":\n N = int(input())\n L = [int(s) for s in input().split()]\n\n ans = BBQ_easy(N, L)\n print(ans)",
"def BBQ_easy(N: int, L: list)->int:\n L.sort()\n return sum(L[0::2])",
"BBQ_easy",
"L.sort()",
"L.sort",
"L",
"sort",
"return sum(L[0::2])",
"sum(L[0::2])",
"sum",
"L[0::2]",
"L",
"0::2",
"0",
"2",
"N: int",
"N",
"L: list",
"L",
"if __name__ == \"__main__\":\n N = int(input())\n L = [int(s) for s in input().split()]\n\n ans = BBQ_easy(N, L)\n print(ans)",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(s) for s in input().split()",
"for s in input().split()",
"s",
"input().split()",
"().split",
"()",
"input",
"split",
"for s in input().split()",
"int(s)",
"int",
"s",
"L = [int(s) for s in input().split()]",
"L",
"[int(s) for s in input().split()]",
"ans = BBQ_easy(N, L)",
"ans",
"BBQ_easy(N, L)",
"BBQ_easy",
"N",
"L",
"print(ans)",
"print",
"ans",
"L = [int(s) for s in input().split()]",
"[int(s) for s in input().split()]",
"L",
"ans = BBQ_easy(N, L)",
"BBQ_easy(N, L)",
"ans",
"N = int(input())",
"int(input())",
"N",
"def BBQ_easy(N: int, L: list)->int:\n L.sort()\n return sum(L[0::2])",
"def BBQ_easy(N: int, L: list)->int:\n L.sort()\n return sum(L[0::2])",
"BBQ_easy"
] | def BBQ_easy(N: int, L: list)->int:
L.sort()
return sum(L[0::2])
if __name__ == "__main__":
N = int(input())
L = [int(s) for s in input().split()]
ans = BBQ_easy(N, L)
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
42,
17,
14,
2,
13,
2,
17,
13,
3,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
17,
4,
13,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
73,
2
],
[
67,
8
],
[
79,
20
],
[
68,
23
],
[
26,
25
],
[
61,
28
],
[
76,
31
],
[
77,
37
],
[
65,
37
],
[
74,
40
],
[
70,
43
],
[
80,
47
],
[
68,
47
],
[
77,
48
],
[
65,
48
],
[
80,
50
],
[
68,
50
],
[
77,
52
],
[
65,
52
],
[
64,
55
],
[
71,
59
],
[
62,
59
],
[
61,
62
],
[
64,
65
],
[
67,
68
],
[
70,
71
],
[
73,
74
],
[
76,
77
],
[
79,
80
]
] | [
"n = int(input())\nL = list(map(int, input().split()))\n\nL = sorted(L, reverse=True)\n\ncnt = 0\ni = 0\nwhile True:\n\tif i == 2*n:\n\t\tbreak\n\tcnt += min(L[i], L[i + 1])\n\ti += 2\n\nprint(cnt)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L = sorted(L, reverse=True)",
"L",
"sorted(L, reverse=True)",
"sorted",
"L",
"reverse=True",
"reverse",
"True",
"cnt = 0",
"cnt",
"0",
"i = 0",
"i",
"0",
"while True:\n\tif i == 2*n:\n\t\tbreak\n\tcnt += min(L[i], L[i + 1])\n\ti += 2",
"True",
"if i == 2*n:\n\t\tbreak\n\t",
"i == 2*n",
"i",
"2*n",
"2",
"n",
"break",
"cnt += min(L[i], L[i + 1])",
"cnt",
"min(L[i], L[i + 1])",
"min",
"L[i]",
"L",
"i",
"L[i + 1]",
"L",
"i + 1",
"i",
"1",
"i += 2",
"i",
"2",
"print(cnt)",
"print",
"cnt",
"cnt = 0",
"0",
"cnt",
"i += 2",
"2",
"i",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"cnt += min(L[i], L[i + 1])",
"min(L[i], L[i + 1])",
"cnt",
"n = int(input())",
"int(input())",
"n",
"i = 0",
"0",
"i",
"L = sorted(L, reverse=True)",
"sorted(L, reverse=True)",
"L"
] | n = int(input())
L = list(map(int, input().split()))
L = sorted(L, reverse=True)
cnt = 0
i = 0
while True:
if i == 2*n:
break
cnt += min(L[i], L[i + 1])
i += 2
print(cnt) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
17,
13,
13,
31,
13,
0,
13,
4,
13,
13,
4,
13,
4,
13,
4,
13,
13,
18,
13,
39,
17,
18,
13,
39,
17,
17,
10,
4,
13,
10,
4,
13
] | [
[
39,
2
],
[
39,
15
],
[
42,
18
],
[
43,
30
],
[
43,
34
],
[
39,
40
],
[
42,
43
]
] | [
"N,*L=map(int, open(0).read().split())\nL=sorted(L)\nprint(sum(map(min, L[::2], L[1::2])))",
"N,*L=map(int, open(0).read().split())",
"N",
"map(int, open(0).read().split())",
"map",
"int",
"open(0).read().split()",
"(0).read().split",
"(0).read()",
"(0).read",
"(0)",
"open",
"0",
"read",
"split",
"*L",
"L",
"L=sorted(L)",
"L",
"sorted(L)",
"sorted",
"L",
"print(sum(map(min, L[::2], L[1::2])))",
"print",
"sum(map(min, L[::2], L[1::2]))",
"sum",
"map(min, L[::2], L[1::2])",
"map",
"min",
"L[::2]",
"L",
"::2",
"2",
"L[1::2]",
"L",
"1::2",
"1",
"2",
"N,*L=map(int, open(0).read().split())",
"map(int, open(0).read().split())",
"N",
"L=sorted(L)",
"sorted(L)",
"L"
] | N,*L=map(int, open(0).read().split())
L=sorted(L)
print(sum(map(min, L[::2], L[1::2]))) |
[
7,
15,
13,
15,
13,
15,
13,
15,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13
] | [
[
58,
10
],
[
55,
16
],
[
56,
29
],
[
52,
32
],
[
36,
35
],
[
59,
40
],
[
61,
44
],
[
56,
46
],
[
35,
47
],
[
62,
50
],
[
53,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
],
[
61,
62
]
] | [
"# -*- coding: utf-8 -*-\n \nimport math\nimport itertools\nimport sys\nimport copy\n#import numpy as np\n \n# 入力\n#A, B, C, D = map(int, input().split())\n#L = list(map(int, input().split()))\n#S = list(str(input()))\n#N = int(input())\n#S = str(input())\n\nN = int(input())\nL = list(map(int, input().split()))\n\nL.sort()\nans = 0\nfor i in range(0, N*2, 2) :\n ans += L[i]\n \nprint (ans)\n",
"import math",
"math",
"import itertools",
"itertools",
"import sys",
"sys",
"import copy",
"copy",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int, input().split()))",
"L",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0, N*2, 2) :\n ans += L[i]\n ",
"i",
"range(0, N*2, 2)",
"range",
"0",
"N*2",
"N",
"2",
"2",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"print (ans)",
"print",
"ans",
"ans = 0",
"0",
"ans",
"L = list(map(int, input().split()))",
"list(map(int, input().split()))",
"L",
"N = int(input())",
"int(input())",
"N",
"ans += L[i]",
"L[i]",
"ans"
] | # -*- coding: utf-8 -*-
import math
import itertools
import sys
import copy
#import numpy as np
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())
N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for i in range(0, N*2, 2) :
ans += L[i]
print (ans)
|
[
7,
15,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
4,
18,
13,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
70,
4
],
[
67,
10
],
[
58,
22
],
[
68,
25
],
[
59,
30
],
[
73,
32
],
[
36,
35
],
[
71,
38
],
[
61,
40
],
[
59,
45
],
[
59,
50
],
[
64,
52
],
[
62,
53
],
[
65,
56
],
[
74,
56
],
[
58,
59
],
[
61,
62
],
[
62,
64
],
[
64,
65
],
[
67,
68
],
[
70,
71
],
[
73,
74
]
] | [
"import heapq\nn = int(input())\nsrc = list(map(int, input().split()))\nsorted_src = sorted(src)\nheapq.heapify(sorted_src)\ncount = 0\nfor i in range(n):\n a = heapq.heappop(sorted_src)\n heapq.heappop(sorted_src)\n count += a\nprint(count)",
"import heapq",
"heapq",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"src = list(map(int, input().split()))",
"src",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"sorted_src = sorted(src)",
"sorted_src",
"sorted(src)",
"sorted",
"src",
"heapq.heapify(sorted_src)",
"heapq.heapify",
"heapq",
"heapify",
"sorted_src",
"count = 0",
"count",
"0",
"for i in range(n):\n a = heapq.heappop(sorted_src)\n heapq.heappop(sorted_src)\n count += a",
"i",
"range(n)",
"range",
"n",
"a = heapq.heappop(sorted_src)",
"a",
"heapq.heappop(sorted_src)",
"heapq.heappop",
"heapq",
"heappop",
"sorted_src",
"heapq.heappop(sorted_src)",
"heapq.heappop",
"heapq",
"heappop",
"sorted_src",
"count += a",
"count",
"a",
"print(count)",
"print",
"count",
"sorted_src = sorted(src)",
"sorted(src)",
"sorted_src",
"a = heapq.heappop(sorted_src)",
"heapq.heappop(sorted_src)",
"a",
"count += a",
"a",
"count",
"src = list(map(int, input().split()))",
"list(map(int, input().split()))",
"src",
"n = int(input())",
"int(input())",
"n",
"count = 0",
"0",
"count"
] | import heapq
n = int(input())
src = list(map(int, input().split()))
sorted_src = sorted(src)
heapq.heapify(sorted_src)
count = 0
for i in range(n):
a = heapq.heappop(sorted_src)
heapq.heappop(sorted_src)
count += a
print(count) |
[
7,
15,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
18,
13,
39,
17,
17,
0,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
13,
13
] | [
[
45,
4
],
[
48,
10
],
[
49,
23
],
[
42,
26
],
[
30,
29
],
[
49,
31
],
[
51,
36
],
[
29,
37
],
[
52,
40
],
[
43,
40
],
[
42,
43
],
[
45,
46
],
[
48,
49
],
[
29,
51
],
[
51,
52
]
] | [
"import sys\n\nkushiYaki = int(input())\n\nkushi = list(map(int, input().split()))\n\nkushi.sort()\n\nmax_ingredients = 0\n\nfor available_ingredient in kushi[0::2]:\n max_ingredients += available_ingredient\n\nprint(max_ingredients)",
"import sys",
"sys",
"kushiYaki = int(input())",
"kushiYaki",
"int(input())",
"int",
"input()",
"input",
"kushi = list(map(int, input().split()))",
"kushi",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"kushi.sort()",
"kushi.sort",
"kushi",
"sort",
"max_ingredients = 0",
"max_ingredients",
"0",
"for available_ingredient in kushi[0::2]:\n max_ingredients += available_ingredient",
"available_ingredient",
"kushi[0::2]",
"kushi",
"0::2",
"0",
"2",
"max_ingredients += available_ingredient",
"max_ingredients",
"available_ingredient",
"print(max_ingredients)",
"print",
"max_ingredients",
"max_ingredients = 0",
"0",
"max_ingredients",
"kushiYaki = int(input())",
"int(input())",
"kushiYaki",
"kushi = list(map(int, input().split()))",
"list(map(int, input().split()))",
"kushi",
"max_ingredients += available_ingredient",
"available_ingredient",
"max_ingredients"
] | import sys
kushiYaki = int(input())
kushi = list(map(int, input().split()))
kushi.sort()
max_ingredients = 0
for available_ingredient in kushi[0::2]:
max_ingredients += available_ingredient
print(max_ingredients)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
42,
2,
13,
2,
17,
13,
0,
13,
18,
13,
13,
0,
13,
17,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
53,
2
],
[
59,
8
],
[
60,
21
],
[
56,
24
],
[
50,
27
],
[
51,
31
],
[
63,
31
],
[
54,
34
],
[
47,
36
],
[
60,
38
],
[
51,
39
],
[
63,
39
],
[
62,
41
],
[
48,
45
],
[
57,
45
],
[
47,
48
],
[
50,
51
],
[
53,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
]
] | [
"N = int(input())\nL = list(map(int,input().split()))\nL.sort()\nans = 0\ni = 0\nwhile(i<2*N):\n ans += L[i]\n i += 2\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"L = list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"i = 0",
"i",
"0",
"while(i<2*N):\n ans += L[i]\n i += 2",
"i<2*N",
"i",
"2*N",
"2",
"N",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"i += 2",
"i",
"2",
"print(ans)",
"print",
"ans",
"ans += L[i]",
"L[i]",
"ans",
"i = 0",
"0",
"i",
"N = int(input())",
"int(input())",
"N",
"ans = 0",
"0",
"ans",
"L = list(map(int,input().split()))",
"list(map(int,input().split()))",
"L",
"i += 2",
"2",
"i"
] | N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
i = 0
while(i<2*N):
ans += L[i]
i += 2
print(ans) |
[
7,
15,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
4,
13,
17,
0,
13,
2,
2,
17,
17,
17,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
4,
13,
10,
2,
13
] | [
[
78,
11
],
[
81,
16
],
[
26,
25
],
[
32,
31
],
[
46,
45
],
[
49,
48
],
[
25,
52
],
[
48,
57
],
[
62,
61
],
[
31,
63
],
[
48,
64
],
[
61,
67
],
[
45,
67
],
[
76,
73
],
[
78,
79
],
[
81,
82
]
] | [
"import sys\n\nsys.setrecursionlimit(10 ** 7)\nf_inf = float('inf')\nmod = 10 ** 9 + 7\n\n\ndef resolve():\n n = int(input())\n L = sorted(list(map(int, input().split())))\n\n res = 0\n for i in range(n * 2):\n if i % 2 == 0:\n res += L[i]\n print(res)\n\n\nif __name__ == '__main__':\n resolve()",
"import sys",
"sys",
"sys.setrecursionlimit(10 ** 7)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10 ** 7",
"10",
"7",
"f_inf = float('inf')",
"f_inf",
"float('inf')",
"float",
"'inf'",
"mod = 10 ** 9 + 7",
"mod",
"10 ** 9 + 7",
"10 ** 9",
"10",
"9",
"7",
"def resolve():\n n = int(input())\n L = sorted(list(map(int, input().split())))\n\n res = 0\n for i in range(n * 2):\n if i % 2 == 0:\n res += L[i]\n print(res)",
"resolve",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"L = sorted(list(map(int, input().split())))",
"L",
"sorted(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"res = 0",
"res",
"0",
"for i in range(n * 2):\n if i % 2 == 0:\n res += L[i]\n ",
"i",
"range(n * 2)",
"range",
"n * 2",
"n",
"2",
"if i % 2 == 0:\n res += L[i]\n ",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"res += L[i]",
"res",
"L[i]",
"L",
"i",
"print(res)",
"print",
"res",
"if __name__ == '__main__':\n resolve()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"resolve()",
"resolve",
"def resolve():\n n = int(input())\n L = sorted(list(map(int, input().split())))\n\n res = 0\n for i in range(n * 2):\n if i % 2 == 0:\n res += L[i]\n print(res)",
"def resolve():\n n = int(input())\n L = sorted(list(map(int, input().split())))\n\n res = 0\n for i in range(n * 2):\n if i % 2 == 0:\n res += L[i]\n print(res)",
"resolve",
"f_inf = float('inf')",
"float('inf')",
"f_inf",
"mod = 10 ** 9 + 7",
"10 ** 9 + 7",
"mod"
] | import sys
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7
def resolve():
n = int(input())
L = sorted(list(map(int, input().split())))
res = 0
for i in range(n * 2):
if i % 2 == 0:
res += L[i]
print(res)
if __name__ == '__main__':
resolve()
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
18,
13,
2,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
33,
2
],
[
36,
8
],
[
37,
21
],
[
37,
28
],
[
33,
34
],
[
36,
37
]
] | [
"N = int(input())\nA = list(map(int, input().split()))\nA.sort()\nprint(sum(A[2*i] for i in range(N)))",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"A = list(map(int, input().split()))",
"A",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A.sort()",
"A.sort",
"A",
"sort",
"print(sum(A[2*i] for i in range(N)))",
"print",
"sum(A[2*i] for i in range(N))",
"sum",
"A[2*i]",
"A",
"2*i",
"2",
"i",
"N = int(input())",
"int(input())",
"N",
"A = list(map(int, input().split()))",
"list(map(int, input().split()))",
"A"
] | N = int(input())
A = list(map(int, input().split()))
A.sort()
print(sum(A[2*i] for i in range(N))) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13,
10,
17,
13
] | [
[
51,
2
],
[
10,
9
],
[
9,
18
],
[
57,
20
],
[
58,
24
],
[
60,
27
],
[
31,
30
],
[
52,
35
],
[
30,
39
],
[
54,
43
],
[
58,
45
],
[
30,
46
],
[
55,
49
],
[
61,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"n = int(input())\nl = [int(x) for x in input().split()]\n\nl.sort()\n\ncnt = 0\nfor i in range(2*n):\n if i%2 == 0:\n cnt += l[i]\n \nprint(cnt)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"l = [int(x) for x in input().split()]",
"l",
"[int(x) for x in input().split()]",
"l.sort()",
"l.sort",
"l",
"sort",
"cnt = 0",
"cnt",
"0",
"for i in range(2*n):\n if i%2 == 0:\n cnt += l[i]\n ",
"i",
"range(2*n)",
"range",
"2*n",
"2",
"n",
"if i%2 == 0:\n cnt += l[i]\n ",
"i%2 == 0",
"i%2",
"i",
"2",
"0",
"cnt += l[i]",
"cnt",
"l[i]",
"l",
"i",
"print(cnt)",
"print",
"cnt",
"n = int(input())",
"int(input())",
"n",
"cnt += l[i]",
"l[i]",
"cnt",
"l = [int(x) for x in input().split()]",
"[int(x) for x in input().split()]",
"l",
"cnt = 0",
"0",
"cnt"
] | n = int(input())
l = [int(x) for x in input().split()]
l.sort()
cnt = 0
for i in range(2*n):
if i%2 == 0:
cnt += l[i]
print(cnt) |
[
7,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
13,
4,
13,
18,
4,
13,
13,
39,
17,
10,
13,
13,
10,
4,
13
] | [
[
36,
2
],
[
10,
9
],
[
9,
18
],
[
33,
20
],
[
34,
29
],
[
33,
34
],
[
36,
37
]
] | [
"n = int(input())\nnum_list = [ int(v) for v in input().split() ]\nprint(sum(sorted(num_list)[::2]))",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"int(v) for v in input().split()",
"for v in input().split()",
"v",
"input().split()",
"().split",
"()",
"input",
"split",
"for v in input().split()",
"int(v)",
"int",
"v",
"num_list = [ int(v) for v in input().split() ]",
"num_list",
"[ int(v) for v in input().split() ]",
"print(sum(sorted(num_list)[::2]))",
"print",
"sum(sorted(num_list)[::2])",
"sum",
"sorted(num_list)[::2]",
"(num_list)",
"sorted",
"num_list",
"::2",
"2",
"num_list = [ int(v) for v in input().split() ]",
"[ int(v) for v in input().split() ]",
"num_list",
"n = int(input())",
"int(input())",
"n"
] | n = int(input())
num_list = [ int(v) for v in input().split() ]
print(sum(sorted(num_list)[::2])) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
54,
2
],
[
51,
8
],
[
52,
21
],
[
57,
24
],
[
28,
27
],
[
52,
33
],
[
60,
36
],
[
52,
40
],
[
27,
41
],
[
52,
43
],
[
27,
45
],
[
61,
49
],
[
58,
49
],
[
51,
52
],
[
54,
55
],
[
57,
58
],
[
60,
61
]
] | [
"N = int(input())\nA = list(map(int, input().split()))\nA.sort()\nans = 0\nfor i in range(0, len(A), 2):\n ans += min(A[i], A[i + 1])\nprint(ans)",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"A = list(map(int, input().split()))",
"A",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A.sort()",
"A.sort",
"A",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0, len(A), 2):\n ans += min(A[i], A[i + 1])",
"i",
"range(0, len(A), 2)",
"range",
"0",
"len(A)",
"len",
"A",
"2",
"ans += min(A[i], A[i + 1])",
"ans",
"min(A[i], A[i + 1])",
"min",
"A[i]",
"A",
"i",
"A[i + 1]",
"A",
"i + 1",
"i",
"1",
"print(ans)",
"print",
"ans",
"A = list(map(int, input().split()))",
"list(map(int, input().split()))",
"A",
"N = int(input())",
"int(input())",
"N",
"ans = 0",
"0",
"ans",
"ans += min(A[i], A[i + 1])",
"min(A[i], A[i + 1])",
"ans"
] | N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(0, len(A), 2):
ans += min(A[i], A[i + 1])
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
4,
13,
18,
13,
2,
17,
13,
18,
13,
2,
2,
17,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
52,
2
],
[
49,
8
],
[
55,
22
],
[
26,
25
],
[
53,
28
],
[
58,
30
],
[
50,
34
],
[
25,
37
],
[
50,
39
],
[
25,
43
],
[
59,
47
],
[
56,
47
],
[
49,
50
],
[
52,
53
],
[
55,
56
],
[
58,
59
]
] | [
"n = int(input())\nls = sorted(list(map(int, input().split())))\ntotal = 0\nfor i in range(n):\n total += min(ls[2*i], ls[2*i+1])\nprint(total)",
"n = int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"ls = sorted(list(map(int, input().split())))",
"ls",
"sorted(list(map(int, input().split())))",
"sorted",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"total = 0",
"total",
"0",
"for i in range(n):\n total += min(ls[2*i], ls[2*i+1])",
"i",
"range(n)",
"range",
"n",
"total += min(ls[2*i], ls[2*i+1])",
"total",
"min(ls[2*i], ls[2*i+1])",
"min",
"ls[2*i]",
"ls",
"2*i",
"2",
"i",
"ls[2*i+1]",
"ls",
"2*i+1",
"2*i",
"2",
"i",
"1",
"print(total)",
"print",
"total",
"ls = sorted(list(map(int, input().split())))",
"sorted(list(map(int, input().split())))",
"ls",
"n = int(input())",
"int(input())",
"n",
"total = 0",
"0",
"total",
"total += min(ls[2*i], ls[2*i+1])",
"min(ls[2*i], ls[2*i+1])",
"total"
] | n = int(input())
ls = sorted(list(map(int, input().split())))
total = 0
for i in range(n):
total += min(ls[2*i], ls[2*i+1])
print(total) |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
18,
13,
39,
17,
17,
0,
13,
4,
13,
13,
4,
13,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13
] | [
[
4,
3
],
[
3,
12
],
[
53,
14
],
[
19,
18
],
[
18,
27
],
[
62,
29
],
[
63,
33
],
[
59,
36
],
[
63,
38
],
[
56,
43
],
[
60,
46
],
[
57,
51
],
[
53,
54
],
[
56,
57
],
[
59,
60
],
[
62,
63
]
] | [
"N = [int(v) for v in input().split()]\nL = [int(v) for v in input().split()]\nL.sort()\nL_even=L[0::2]\ngoukei=sum(L_even)\nprint(str(goukei))",
"int(v) for v in input().split()",
"for v in input().split()",
"v",
"input().split()",
"().split",
"()",
"input",
"split",
"for v in input().split()",
"int(v)",
"int",
"v",
"N = [int(v) for v in input().split()]",
"N",
"[int(v) for v in input().split()]",
"int(v) for v in input().split()",
"for v in input().split()",
"v",
"input().split()",
"().split",
"()",
"input",
"split",
"for v in input().split()",
"int(v)",
"int",
"v",
"L = [int(v) for v in input().split()]",
"L",
"[int(v) for v in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"L_even=L[0::2]",
"L_even",
"L[0::2]",
"L",
"0::2",
"0",
"2",
"goukei=sum(L_even)",
"goukei",
"sum(L_even)",
"sum",
"L_even",
"print(str(goukei))",
"print",
"str(goukei)",
"str",
"goukei",
"N = [int(v) for v in input().split()]",
"[int(v) for v in input().split()]",
"N",
"goukei=sum(L_even)",
"sum(L_even)",
"goukei",
"L_even=L[0::2]",
"L[0::2]",
"L_even",
"L = [int(v) for v in input().split()]",
"[int(v) for v in input().split()]",
"L"
] | N = [int(v) for v in input().split()]
L = [int(v) for v in input().split()]
L.sort()
L_even=L[0::2]
goukei=sum(L_even)
print(str(goukei))
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
4,
13,
13,
17,
14,
2,
2,
13,
17,
17,
0,
13,
4,
13,
18,
13,
13,
18,
13,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
61,
2
],
[
70,
8
],
[
71,
21
],
[
25,
24
],
[
67,
27
],
[
31,
30
],
[
71,
37
],
[
30,
42
],
[
64,
46
],
[
71,
50
],
[
30,
51
],
[
71,
53
],
[
30,
55
],
[
65,
59
],
[
68,
59
],
[
61,
62
],
[
64,
65
],
[
67,
68
],
[
70,
71
]
] | [
"n=int(input())\nl=list(map(int,input().split()))\nl.sort(reverse=True)\nans=0\nfor i in range(0,len(l)-1):\n if i%2==0:\n ans+=min(l[i],l[i+1])\n\nprint(ans)\n",
"n=int(input())",
"n",
"int(input())",
"int",
"input()",
"input",
"l=list(map(int,input().split()))",
"l",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"l.sort(reverse=True)",
"l.sort",
"l",
"sort",
"reverse=True",
"reverse",
"True",
"ans=0",
"ans",
"0",
"for i in range(0,len(l)-1):\n if i%2==0:\n ans+=min(l[i],l[i+1])",
"i",
"range(0,len(l)-1)",
"range",
"0",
"len(l)-1",
"len(l)",
"len",
"l",
"1",
"if i%2==0:\n ans+=min(l[i],l[i+1])",
"i%2==0",
"i%2",
"i",
"2",
"0",
"ans+=min(l[i],l[i+1])",
"ans",
"min(l[i],l[i+1])",
"min",
"l[i]",
"l",
"i",
"l[i+1]",
"l",
"i+1",
"i",
"1",
"print(ans)",
"print",
"ans",
"n=int(input())",
"int(input())",
"n",
"ans+=min(l[i],l[i+1])",
"min(l[i],l[i+1])",
"ans",
"ans=0",
"0",
"ans",
"l=list(map(int,input().split()))",
"list(map(int,input().split()))",
"l"
] | n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(0,len(l)-1):
if i%2==0:
ans+=min(l[i],l[i+1])
print(ans)
|
[
7,
15,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
18,
18,
13,
13,
13,
12,
13,
0,
13,
4,
13,
4,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
4,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
18,
13
] | [
[
74,
11
],
[
21,
20
],
[
75,
24
],
[
28,
27
],
[
75,
31
],
[
27,
36
],
[
39,
38
],
[
38,
42
],
[
46,
45
],
[
49,
48
],
[
20,
53
],
[
58,
57
],
[
38,
59
],
[
48,
60
],
[
57,
63
],
[
45,
63
],
[
72,
69
],
[
74,
75
]
] | [
"import sys\n\nsys.setrecursionlimit(10 ** 8)\n\ninput = sys.stdin.readline\n\n\ndef main():\n N = int(input())\n L = [int(x) for x in input().split()]\n\n L.sort()\n ans = 0\n for i in range(0, N * 2, 2):\n ans += L[i]\n\n print(ans)\n\n\n\n\nif __name__ == '__main__':\n main()",
"import sys",
"sys",
"sys.setrecursionlimit(10 ** 8)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10 ** 8",
"10",
"8",
"input = sys.stdin.readline",
"input",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"def main():\n N = int(input())\n L = [int(x) for x in input().split()]\n\n L.sort()\n ans = 0\n for i in range(0, N * 2, 2):\n ans += L[i]\n\n print(ans)",
"main",
"N = int(input())",
"N",
"int(input())",
"int",
"input()",
"input",
"int(x) for x in input().split()",
"for x in input().split()",
"x",
"input().split()",
"().split",
"()",
"input",
"split",
"for x in input().split()",
"int(x)",
"int",
"x",
"L = [int(x) for x in input().split()]",
"L",
"[int(x) for x in input().split()]",
"L.sort()",
"L.sort",
"L",
"sort",
"ans = 0",
"ans",
"0",
"for i in range(0, N * 2, 2):\n ans += L[i]\n\n ",
"i",
"range(0, N * 2, 2)",
"range",
"0",
"N * 2",
"N",
"2",
"2",
"ans += L[i]",
"ans",
"L[i]",
"L",
"i",
"print(ans)",
"print",
"ans",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n N = int(input())\n L = [int(x) for x in input().split()]\n\n L.sort()\n ans = 0\n for i in range(0, N * 2, 2):\n ans += L[i]\n\n print(ans)",
"def main():\n N = int(input())\n L = [int(x) for x in input().split()]\n\n L.sort()\n ans = 0\n for i in range(0, N * 2, 2):\n ans += L[i]\n\n print(ans)",
"main",
"input = sys.stdin.readline",
"sys.stdin.readline",
"input"
] | import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
N = int(input())
L = [int(x) for x in input().split()]
L.sort()
ans = 0
for i in range(0, N * 2, 2):
ans += L[i]
print(ans)
if __name__ == '__main__':
main()
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.