node_ids
listlengths 4
1.4k
| edge_index
listlengths 1
2.22k
| text
listlengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n list.sort(Comparator.naturalOrder());\n for (int i = 0; i < k; i++) {\n res += list.get(i);\n }\n System.out.println(res);\n sc.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n list.sort(Comparator.naturalOrder());\n for (int i = 0; i < k; i++) {\n res += list.get(i);\n }\n System.out.println(res);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n list.sort(Comparator.naturalOrder());\n for (int i = 0; i < k; i++) {\n res += list.get(i);\n }\n System.out.println(res);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n list.sort(Comparator.naturalOrder());\n for (int i = 0; i < k; i++) {\n res += list.get(i);\n }\n System.out.println(res);\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int res = 0;",
"res",
"0",
"ArrayList<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n list.add(sc.nextInt());\n }",
"{\n list.add(sc.nextInt());\n }",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list.sort(Comparator.naturalOrder())",
"list.sort",
"list",
"Comparator.naturalOrder()",
"Comparator.naturalOrder",
"Comparator",
"for (int i = 0; i < k; i++) {\n res += list.get(i);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n res += list.get(i);\n }",
"{\n res += list.get(i);\n }",
"res += list.get(i)",
"res",
"list.get(i)",
"list.get",
"list",
"i",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n list.sort(Comparator.naturalOrder());\n for (int i = 0; i < k; i++) {\n res += list.get(i);\n }\n System.out.println(res);\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int res = 0;\n ArrayList<Integer> list = new ArrayList<>();\n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n list.sort(Comparator.naturalOrder());\n for (int i = 0; i < k; i++) {\n res += list.get(i);\n }\n System.out.println(res);\n sc.close();\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int res = 0;
ArrayList<Integer> list = new ArrayList<>();
for (int i = 0; i < n; i++) {
list.add(sc.nextInt());
}
list.sort(Comparator.naturalOrder());
for (int i = 0; i < k; i++) {
res += list.get(i);
}
System.out.println(res);
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
89,
14
],
[
89,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
17,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
17,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
17,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
15,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.util.Map.Entry;\nimport java.util.*;\nimport java.math.*;\nimport org.w3c.dom.css.Counter;\n \npublic class Main{\n public static void main(final String[] args){\n \n final Scanner sc = new Scanner(System.in);\n //int N =sc.nextInt();\n ArrayList<Integer> allmen =new ArrayList <Integer>();\n //HashSet doubled =new HashSet<Integer>();\n \n //Set<?> yourHashSet = new HashSet<>();\n //List<?> sortedList = new ArrayList<>(yourHashSet);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n int counter =0;\n //HashSet doubled =new HashSet<Integer>();\n for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }\n Collections.sort(allmen);\n for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }\n\n System.out.println(counter);\n\n\n //System.out.println(ans);\n }\n}\n \n\n/* for(int i=0;i<N-1;i++){\n int target = sc.nextInt();\n if(target < blocker){\n blocker = target;\n }\n if(allmen.contains(target)==false){\n if(target%blocker!=0){\n allmen.add(target);\n } \n }\n else{\n doubled.add(target);\n } \n \n }\n Collections.sort(allmen);\n //画面表示\n for(int i=0;i <=allmen.size()-1;i++){\n boolean judge = true;\n int target = allmen.get(i);\n if(doubled.contains(target)==false){\n for(int X= 0;X<i;X++){\n if(target% allmen.get(X)==0){\n judge = false;\n break;\n }\n }\n }else{\n judge = false;\n }\n if(judge == true){\n ans++;\n }\n } */\n\n ",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import org.w3c.dom.css.Counter;",
"Counter",
"org.w3c.dom.css",
"public class Main{\n public static void main(final String[] args){\n \n final Scanner sc = new Scanner(System.in);\n //int N =sc.nextInt();\n ArrayList<Integer> allmen =new ArrayList <Integer>();\n //HashSet doubled =new HashSet<Integer>();\n \n //Set<?> yourHashSet = new HashSet<>();\n //List<?> sortedList = new ArrayList<>(yourHashSet);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n int counter =0;\n //HashSet doubled =new HashSet<Integer>();\n for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }\n Collections.sort(allmen);\n for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }\n\n System.out.println(counter);\n\n\n //System.out.println(ans);\n }\n}",
"Main",
"public static void main(final String[] args){\n \n final Scanner sc = new Scanner(System.in);\n //int N =sc.nextInt();\n ArrayList<Integer> allmen =new ArrayList <Integer>();\n //HashSet doubled =new HashSet<Integer>();\n \n //Set<?> yourHashSet = new HashSet<>();\n //List<?> sortedList = new ArrayList<>(yourHashSet);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n int counter =0;\n //HashSet doubled =new HashSet<Integer>();\n for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }\n Collections.sort(allmen);\n for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }\n\n System.out.println(counter);\n\n\n //System.out.println(ans);\n }",
"main",
"{\n \n final Scanner sc = new Scanner(System.in);\n //int N =sc.nextInt();\n ArrayList<Integer> allmen =new ArrayList <Integer>();\n //HashSet doubled =new HashSet<Integer>();\n \n //Set<?> yourHashSet = new HashSet<>();\n //List<?> sortedList = new ArrayList<>(yourHashSet);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n int counter =0;\n //HashSet doubled =new HashSet<Integer>();\n for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }\n Collections.sort(allmen);\n for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }\n\n System.out.println(counter);\n\n\n //System.out.println(ans);\n }",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"ArrayList<Integer> allmen =new ArrayList <Integer>();",
"allmen",
"new ArrayList <Integer>()",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int counter =0;",
"counter",
"0",
"for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }",
"int i =0;",
"int i =0;",
"i",
"0",
"i <N",
"i",
"N",
"i++",
"i++",
"i",
"{\n allmen.add(i, sc.nextInt());\n }",
"{\n allmen.add(i, sc.nextInt());\n }",
"allmen.add(i, sc.nextInt())",
"allmen.add",
"allmen",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(allmen)",
"Collections.sort",
"Collections",
"allmen",
"for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }",
"int i =0;",
"int i =0;",
"i",
"0",
"i <K",
"i",
"K",
"i++",
"i++",
"i",
"{\n counter += allmen.get(i);\n }",
"{\n counter += allmen.get(i);\n }",
"counter += allmen.get(i)",
"counter",
"allmen.get(i)",
"allmen.get",
"allmen",
"i",
"System.out.println(counter)",
"System.out.println",
"System.out",
"System",
"System.out",
"counter",
"final String[] args",
"args",
"public class Main{\n public static void main(final String[] args){\n \n final Scanner sc = new Scanner(System.in);\n //int N =sc.nextInt();\n ArrayList<Integer> allmen =new ArrayList <Integer>();\n //HashSet doubled =new HashSet<Integer>();\n \n //Set<?> yourHashSet = new HashSet<>();\n //List<?> sortedList = new ArrayList<>(yourHashSet);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n int counter =0;\n //HashSet doubled =new HashSet<Integer>();\n for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }\n Collections.sort(allmen);\n for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }\n\n System.out.println(counter);\n\n\n //System.out.println(ans);\n }\n}",
"public class Main{\n public static void main(final String[] args){\n \n final Scanner sc = new Scanner(System.in);\n //int N =sc.nextInt();\n ArrayList<Integer> allmen =new ArrayList <Integer>();\n //HashSet doubled =new HashSet<Integer>();\n \n //Set<?> yourHashSet = new HashSet<>();\n //List<?> sortedList = new ArrayList<>(yourHashSet);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n int counter =0;\n //HashSet doubled =new HashSet<Integer>();\n for(int i =0;i <N;i++){\n allmen.add(i, sc.nextInt());\n }\n Collections.sort(allmen);\n for(int i =0;i <K;i++){\n counter += allmen.get(i);\n }\n\n System.out.println(counter);\n\n\n //System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.Map.Entry;
import java.util.*;
import java.math.*;
import org.w3c.dom.css.Counter;
public class Main{
public static void main(final String[] args){
final Scanner sc = new Scanner(System.in);
//int N =sc.nextInt();
ArrayList<Integer> allmen =new ArrayList <Integer>();
//HashSet doubled =new HashSet<Integer>();
//Set<?> yourHashSet = new HashSet<>();
//List<?> sortedList = new ArrayList<>(yourHashSet);
int N = sc.nextInt();
int K = sc.nextInt();
int counter =0;
//HashSet doubled =new HashSet<Integer>();
for(int i =0;i <N;i++){
allmen.add(i, sc.nextInt());
}
Collections.sort(allmen);
for(int i =0;i <K;i++){
counter += allmen.get(i);
}
System.out.println(counter);
//System.out.println(ans);
}
}
/* for(int i=0;i<N-1;i++){
int target = sc.nextInt();
if(target < blocker){
blocker = target;
}
if(allmen.contains(target)==false){
if(target%blocker!=0){
allmen.add(target);
}
}
else{
doubled.add(target);
}
}
Collections.sort(allmen);
//画面表示
for(int i=0;i <=allmen.size()-1;i++){
boolean judge = true;
int target = allmen.get(i);
if(doubled.contains(target)==false){
for(int X= 0;X<i;X++){
if(target% allmen.get(X)==0){
judge = false;
break;
}
}
}else{
judge = false;
}
if(judge == true){
ans++;
}
} */
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
20,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
17,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
17,
44
],
[
44,
45
],
[
44,
46
],
[
17,
47
],
[
47,
48
],
[
47,
49
],
[
17,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
17,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
17,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
17,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
15,
98
],
[
98,
99
]
]
| [
"import java.util.*;\nimport java.lang.*;\nimport java.math.*;\nimport java.io.*;\nclass Main{\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n \tint n=in.nextInt(), k=in.nextInt(),sum=0;\n \tint a[]=new int[n];\n \tfor(int i=0;i<n;i++)\n \t\ta[i]=in.nextInt();\n \tArrays.sort(a);\n \tfor(int i=0;i<k;i++){\n \t\tsum+=a[i];\n \t}\n \tSystem.out.println(sum);\n\t} \n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main{\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n \tint n=in.nextInt(), k=in.nextInt(),sum=0;\n \tint a[]=new int[n];\n \tfor(int i=0;i<n;i++)\n \t\ta[i]=in.nextInt();\n \tArrays.sort(a);\n \tfor(int i=0;i<k;i++){\n \t\tsum+=a[i];\n \t}\n \tSystem.out.println(sum);\n\t} \n}",
"Main",
"public static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n \tint n=in.nextInt(), k=in.nextInt(),sum=0;\n \tint a[]=new int[n];\n \tfor(int i=0;i<n;i++)\n \t\ta[i]=in.nextInt();\n \tArrays.sort(a);\n \tfor(int i=0;i<k;i++){\n \t\tsum+=a[i];\n \t}\n \tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tInputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n \tint n=in.nextInt(), k=in.nextInt(),sum=0;\n \tint a[]=new int[n];\n \tfor(int i=0;i<n;i++)\n \t\ta[i]=in.nextInt();\n \tArrays.sort(a);\n \tfor(int i=0;i<k;i++){\n \t\tsum+=a[i];\n \t}\n \tSystem.out.println(sum);\n\t}",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"int n=in.nextInt()",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"k=in.nextInt()",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"sum=0;",
"sum",
"0",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n \t\ta[i]=in.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=in.nextInt();",
"a[i]=in.nextInt()",
"a[i]",
"a",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"for(int i=0;i<k;i++){\n \t\tsum+=a[i];\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \t\tsum+=a[i];\n \t}",
"{\n \t\tsum+=a[i];\n \t}",
"sum+=a[i]",
"sum",
"a[i]",
"a",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args"
]
| import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
class Main{
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
int n=in.nextInt(), k=in.nextInt(),sum=0;
int a[]=new int[n];
for(int i=0;i<n;i++)
a[i]=in.nextInt();
Arrays.sort(a);
for(int i=0;i<k;i++){
sum+=a[i];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
94,
8
],
[
94,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
22,
23
],
[
23,
24
],
[
13,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
31,
32
],
[
13,
33
],
[
33,
34
],
[
33,
35
],
[
13,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
13,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
13,
64
],
[
64,
65
],
[
64,
66
],
[
13,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
13,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
9,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }\n }\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }\n }",
"main",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }",
"{\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = Integer.parseInt(sc.next());",
"N",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int K = Integer.parseInt(sc.next());",
"K",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int[] p = new int[N];",
"p",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n p[i] = Integer.parseInt(sc.next());\n }",
"{\n p[i] = Integer.parseInt(sc.next());\n }",
"p[i] = Integer.parseInt(sc.next())",
"p[i]",
"p",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < K; i++) {\n sum += p[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n sum += p[i];\n }",
"{\n sum += p[i];\n }",
"sum += p[i]",
"sum",
"p[i]",
"p",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int K = Integer.parseInt(sc.next());\n int[] p = new int[N];\n for (int i = 0; i < N; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n Arrays.sort(p);\n int sum = 0;\n for (int i = 0; i < K; i++) {\n sum += p[i];\n }\n System.out.println(sum);\n }\n }\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = Integer.parseInt(sc.next());
int K = Integer.parseInt(sc.next());
int[] p = new int[N];
for (int i = 0; i < N; i++) {
p[i] = Integer.parseInt(sc.next());
}
Arrays.sort(p);
int sum = 0;
for (int i = 0; i < K; i++) {
sum += p[i];
}
System.out.println(sum);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
14,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
30,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
42,
52
],
[
52,
53
],
[
53,
54
],
[
42,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
8,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
8,
71
],
[
71,
72
],
[
71,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"//package beg_171;\nimport java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] a = s.nextLine().split(\" \");\n\t\tint many = Integer.parseInt(a[1]);\n\t\t\n\t\tString[] l = s.nextLine().split(\" \");\n\t\tint[] list = new int[l.length];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint count=0;\n\t\tfor (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] a = s.nextLine().split(\" \");\n\t\tint many = Integer.parseInt(a[1]);\n\t\t\n\t\tString[] l = s.nextLine().split(\" \");\n\t\tint[] list = new int[l.length];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint count=0;\n\t\tfor (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] a = s.nextLine().split(\" \");\n\t\tint many = Integer.parseInt(a[1]);\n\t\t\n\t\tString[] l = s.nextLine().split(\" \");\n\t\tint[] list = new int[l.length];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint count=0;\n\t\tfor (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] a = s.nextLine().split(\" \");\n\t\tint many = Integer.parseInt(a[1]);\n\t\t\n\t\tString[] l = s.nextLine().split(\" \");\n\t\tint[] list = new int[l.length];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint count=0;\n\t\tfor (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"String[] a = s.nextLine().split(\" \");",
"a",
"s.nextLine().split(\" \")",
"s.nextLine().split",
"s.nextLine()",
"s.nextLine",
"s",
"\" \"",
"int many = Integer.parseInt(a[1]);",
"many",
"Integer.parseInt(a[1])",
"Integer.parseInt",
"Integer",
"a[1]",
"a",
"1",
"String[] l = s.nextLine().split(\" \");",
"l",
"s.nextLine().split(\" \")",
"s.nextLine().split",
"s.nextLine()",
"s.nextLine",
"s",
"\" \"",
"int[] list = new int[l.length];",
"list",
"new int[l.length]",
"l.length",
"l",
"l.length",
"for (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<l.length",
"i",
"l.length",
"l",
"l.length",
"i++",
"i++",
"i",
"{\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}",
"{\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}",
"list[i]=Integer.parseInt(l[i])",
"list[i]",
"list",
"i",
"Integer.parseInt(l[i])",
"Integer.parseInt",
"Integer",
"l[i]",
"l",
"i",
"Arrays.sort(list)",
"Arrays.sort",
"Arrays",
"list",
"int count=0;",
"count",
"0",
"for (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<many",
"i",
"many",
"i++",
"i++",
"i",
"{\n\t\t\tcount=count+list[i];\n\t\t}",
"{\n\t\t\tcount=count+list[i];\n\t\t}",
"count=count+list[i]",
"count",
"count+list[i]",
"count",
"list[i]",
"list",
"i",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] a = s.nextLine().split(\" \");\n\t\tint many = Integer.parseInt(a[1]);\n\t\t\n\t\tString[] l = s.nextLine().split(\" \");\n\t\tint[] list = new int[l.length];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint count=0;\n\t\tfor (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] a = s.nextLine().split(\" \");\n\t\tint many = Integer.parseInt(a[1]);\n\t\t\n\t\tString[] l = s.nextLine().split(\" \");\n\t\tint[] list = new int[l.length];\n\t\tfor (int i=0;i<l.length;i++) {\n\t\t\tlist[i]=Integer.parseInt(l[i]);\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint count=0;\n\t\tfor (int i=0;i<many;i++) {\n\t\t\tcount=count+list[i];\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\n}",
"Main"
]
| //package beg_171;
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s = new Scanner(System.in);
String[] a = s.nextLine().split(" ");
int many = Integer.parseInt(a[1]);
String[] l = s.nextLine().split(" ");
int[] list = new int[l.length];
for (int i=0;i<l.length;i++) {
list[i]=Integer.parseInt(l[i]); }
Arrays.sort(list);
int count=0;
for (int i=0;i<many;i++) {
count=count+list[i];
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n List<Integer> list = new ArrayList<>();\n \n for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }\n \n Collections.sort(list);\n int sum = 0;\n \n for(int i=0;i<K;i++){\n sum += list.get(i);\n }\n \n System.out.println(sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n List<Integer> list = new ArrayList<>();\n \n for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }\n \n Collections.sort(list);\n int sum = 0;\n \n for(int i=0;i<K;i++){\n sum += list.get(i);\n }\n \n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n List<Integer> list = new ArrayList<>();\n \n for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }\n \n Collections.sort(list);\n int sum = 0;\n \n for(int i=0;i<K;i++){\n sum += list.get(i);\n }\n \n System.out.println(sum);\n }",
"main",
"{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n List<Integer> list = new ArrayList<>();\n \n for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }\n \n Collections.sort(list);\n int sum = 0;\n \n for(int i=0;i<K;i++){\n sum += list.get(i);\n }\n \n System.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n list.add(sc.nextInt());\n }",
"{\n list.add(sc.nextInt());\n }",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"int sum = 0;",
"sum",
"0",
"for(int i=0;i<K;i++){\n sum += list.get(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n sum += list.get(i);\n }",
"{\n sum += list.get(i);\n }",
"sum += list.get(i)",
"sum",
"list.get(i)",
"list.get",
"list",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n List<Integer> list = new ArrayList<>();\n \n for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }\n \n Collections.sort(list);\n int sum = 0;\n \n for(int i=0;i<K;i++){\n sum += list.get(i);\n }\n \n System.out.println(sum);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n List<Integer> list = new ArrayList<>();\n \n for(int i=0;i<N;i++){\n list.add(sc.nextInt());\n }\n \n Collections.sort(list);\n int sum = 0;\n \n for(int i=0;i<K;i++){\n sum += list.get(i);\n }\n \n System.out.println(sum);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<Integer> list = new ArrayList<>();
for(int i=0;i<N;i++){
list.add(sc.nextInt());
}
Collections.sort(list);
int sum = 0;
for(int i=0;i<K;i++){
sum += list.get(i);
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
88,
11
],
[
88,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
14,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
14,
57
],
[
57,
58
],
[
57,
59
],
[
14,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
60,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
14,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
12,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.math.*;\nimport java.util.Scanner;\nimport java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k = scn.nextInt();\n\t\tArrayList<Integer> arr=new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}Collections.sort(arr);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}System.out.println(ans);\n\t}\n}\t",
"import java.math.*;",
"math.*",
"java",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k = scn.nextInt();\n\t\tArrayList<Integer> arr=new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}Collections.sort(arr);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}System.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k = scn.nextInt();\n\t\tArrayList<Integer> arr=new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}Collections.sort(arr);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}System.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k = scn.nextInt();\n\t\tArrayList<Integer> arr=new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}Collections.sort(arr);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}System.out.println(ans);\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int k = scn.nextInt();",
"k",
"scn.nextInt()",
"scn.nextInt",
"scn",
"ArrayList<Integer> arr=new ArrayList<Integer>();",
"arr",
"new ArrayList<Integer>()",
"for(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}",
"{\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}",
"int p = scn.nextInt();",
"p",
"scn.nextInt()",
"scn.nextInt",
"scn",
"arr.add(p)",
"arr.add",
"arr",
"p",
"Collections.sort(arr)",
"Collections.sort",
"Collections",
"arr",
"int ans=0;",
"ans",
"0",
"for(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tans+=arr.get(i);\n\t\t}",
"{\n\t\t\tans+=arr.get(i);\n\t\t}",
"ans+=arr.get(i)",
"ans",
"arr.get(i)",
"arr.get",
"arr",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k = scn.nextInt();\n\t\tArrayList<Integer> arr=new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}Collections.sort(arr);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}System.out.println(ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint n = scn.nextInt();\n\t\tint k = scn.nextInt();\n\t\tArrayList<Integer> arr=new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p = scn.nextInt();\n\t\t\tarr.add(p);\n\t\t}Collections.sort(arr);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tans+=arr.get(i);\n\t\t}System.out.println(ans);\n\t}\n}",
"Main"
]
| import java.math.*;
import java.util.Scanner;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int k = scn.nextInt();
ArrayList<Integer> arr=new ArrayList<Integer>();
for(int i=0;i<n;i++) {
int p = scn.nextInt();
arr.add(p);
}Collections.sort(arr);
int ans=0;
for(int i=0;i<k;i++) {
ans+=arr.get(i);
}System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
85,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
11,
54
],
[
54,
55
],
[
54,
56
],
[
11,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
11,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
9,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.*;\nimport java.math.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n \n List<Integer> a = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }\n Collections.sort(a);\n\t\t\t\n\t\tint price = 0;\n\t\tfor (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}\n\t\tSystem.out.println(price);\n }\n\t\t\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n \n List<Integer> a = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }\n Collections.sort(a);\n\t\t\t\n\t\tint price = 0;\n\t\tfor (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}\n\t\tSystem.out.println(price);\n }\n\t\t\n}",
"Main",
"public static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n \n List<Integer> a = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }\n Collections.sort(a);\n\t\t\t\n\t\tint price = 0;\n\t\tfor (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}\n\t\tSystem.out.println(price);\n }",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n \n List<Integer> a = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }\n Collections.sort(a);\n\t\t\t\n\t\tint price = 0;\n\t\tfor (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}\n\t\tSystem.out.println(price);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> a = new ArrayList<>();",
"a",
"new ArrayList<>()",
"for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }",
"{\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a.add(d)",
"a.add",
"a",
"d",
"Collections.sort(a)",
"Collections.sort",
"Collections",
"a",
"int price = 0;",
"price",
"0",
"for (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < K",
"j",
"K",
"j++",
"j++",
"j",
"{\n\t\t\tprice += a.get(j);\n\t\t}",
"{\n\t\t\tprice += a.get(j);\n\t\t}",
"price += a.get(j)",
"price",
"a.get(j)",
"a.get",
"a",
"j",
"System.out.println(price)",
"System.out.println",
"System.out",
"System",
"System.out",
"price",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n \n List<Integer> a = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }\n Collections.sort(a);\n\t\t\t\n\t\tint price = 0;\n\t\tfor (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}\n\t\tSystem.out.println(price);\n }\n\t\t\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n \n List<Integer> a = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n int d = sc.nextInt();\n\t\t\ta.add(d);\n }\n Collections.sort(a);\n\t\t\t\n\t\tint price = 0;\n\t\tfor (int j = 0; j < K; j++) {\n\t\t\tprice += a.get(j);\n\t\t}\n\t\tSystem.out.println(price);\n }\n\t\t\n}",
"Main"
]
| import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
List<Integer> a = new ArrayList<>();
for (int i = 0; i < N; i++) {
int d = sc.nextInt();
a.add(d);
}
Collections.sort(a);
int price = 0;
for (int j = 0; j < K; j++) {
price += a.get(j);
}
System.out.println(price);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
103,
8
],
[
103,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
11,
16
],
[
16,
17
],
[
16,
18
],
[
11,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
24,
25
],
[
24,
26
],
[
19,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
31,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
11,
37
],
[
37,
38
],
[
9,
39
],
[
39,
40
],
[
9,
41
],
[
41,
42
],
[
9,
43
],
[
43,
44
],
[
103,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
47,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
47,
61
],
[
61,
62
],
[
61,
63
],
[
47,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
65,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
47,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
89,
92
],
[
89,
93
],
[
47,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
45,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tprivate static int MixJuice(int[] arr, int n, int k) {\n\t\t\n\t\tArrays.sort(arr);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}\n\t\treturn sum;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t\tScanner s= new Scanner(System.in);\n//\t\t char s1= s.next().charAt(0);\n//\t\t \n//\t\t if(s1 >='A' && s1 <= 'Z')\n//\t\t System.out.println(\"A\");\n//\t\t else\n//\t\t \tSystem.out.println(\"a\");\n\t\t \n\t\t int n = s.nextInt();\n\t\t int k=s.nextInt();\n\t\t int[] arr = new int[n];\n\t\t for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }\n\t\t \n\t\t int result=MixJuice(arr,n,k);\n\t\t System.out.println(result);\n\t}\n\n\t\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tprivate static int MixJuice(int[] arr, int n, int k) {\n\t\t\n\t\tArrays.sort(arr);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}\n\t\treturn sum;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t\tScanner s= new Scanner(System.in);\n//\t\t char s1= s.next().charAt(0);\n//\t\t \n//\t\t if(s1 >='A' && s1 <= 'Z')\n//\t\t System.out.println(\"A\");\n//\t\t else\n//\t\t \tSystem.out.println(\"a\");\n\t\t \n\t\t int n = s.nextInt();\n\t\t int k=s.nextInt();\n\t\t int[] arr = new int[n];\n\t\t for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }\n\t\t \n\t\t int result=MixJuice(arr,n,k);\n\t\t System.out.println(result);\n\t}\n\n\t\n\n}",
"Main",
"private static int MixJuice(int[] arr, int n, int k) {\n\t\t\n\t\tArrays.sort(arr);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}\n\t\treturn sum;\n\t}",
"MixJuice",
"{\n\t\t\n\t\tArrays.sort(arr);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}\n\t\treturn sum;\n\t}",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tsum+=arr[i];\n\t\t}",
"{\n\t\t\tsum+=arr[i];\n\t\t}",
"sum+=arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"return sum;",
"sum",
"int[] arr",
"arr",
"int n",
"n",
"int k",
"k",
"public static void main(String[] args) {\n\t\t\tScanner s= new Scanner(System.in);\n//\t\t char s1= s.next().charAt(0);\n//\t\t \n//\t\t if(s1 >='A' && s1 <= 'Z')\n//\t\t System.out.println(\"A\");\n//\t\t else\n//\t\t \tSystem.out.println(\"a\");\n\t\t \n\t\t int n = s.nextInt();\n\t\t int k=s.nextInt();\n\t\t int[] arr = new int[n];\n\t\t for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }\n\t\t \n\t\t int result=MixJuice(arr,n,k);\n\t\t System.out.println(result);\n\t}",
"main",
"{\n\t\t\tScanner s= new Scanner(System.in);\n//\t\t char s1= s.next().charAt(0);\n//\t\t \n//\t\t if(s1 >='A' && s1 <= 'Z')\n//\t\t System.out.println(\"A\");\n//\t\t else\n//\t\t \tSystem.out.println(\"a\");\n\t\t \n\t\t int n = s.nextInt();\n\t\t int k=s.nextInt();\n\t\t int[] arr = new int[n];\n\t\t for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }\n\t\t \n\t\t int result=MixJuice(arr,n,k);\n\t\t System.out.println(result);\n\t}",
"Scanner s= new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int k=s.nextInt();",
"k",
"s.nextInt()",
"s.nextInt",
"s",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\t arr[i]=s.nextInt();\n\t\t }",
"{\n\t\t\t arr[i]=s.nextInt();\n\t\t }",
"arr[i]=s.nextInt()",
"arr[i]",
"arr",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"int result=MixJuice(arr,n,k);",
"result",
"MixJuice(arr,n,k)",
"MixJuice",
"arr",
"n",
"k",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\t\n\tprivate static int MixJuice(int[] arr, int n, int k) {\n\t\t\n\t\tArrays.sort(arr);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}\n\t\treturn sum;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t\tScanner s= new Scanner(System.in);\n//\t\t char s1= s.next().charAt(0);\n//\t\t \n//\t\t if(s1 >='A' && s1 <= 'Z')\n//\t\t System.out.println(\"A\");\n//\t\t else\n//\t\t \tSystem.out.println(\"a\");\n\t\t \n\t\t int n = s.nextInt();\n\t\t int k=s.nextInt();\n\t\t int[] arr = new int[n];\n\t\t for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }\n\t\t \n\t\t int result=MixJuice(arr,n,k);\n\t\t System.out.println(result);\n\t}\n\n\t\n\n}",
"public class Main {\n\t\n\tprivate static int MixJuice(int[] arr, int n, int k) {\n\t\t\n\t\tArrays.sort(arr);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++)\n\t\t{\n\t\t\tsum+=arr[i];\n\t\t}\n\t\treturn sum;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t\tScanner s= new Scanner(System.in);\n//\t\t char s1= s.next().charAt(0);\n//\t\t \n//\t\t if(s1 >='A' && s1 <= 'Z')\n//\t\t System.out.println(\"A\");\n//\t\t else\n//\t\t \tSystem.out.println(\"a\");\n\t\t \n\t\t int n = s.nextInt();\n\t\t int k=s.nextInt();\n\t\t int[] arr = new int[n];\n\t\t for(int i=0;i<arr.length;i++)\n\t\t {\n\t\t\t arr[i]=s.nextInt();\n\t\t }\n\t\t \n\t\t int result=MixJuice(arr,n,k);\n\t\t System.out.println(result);\n\t}\n\n\t\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
private static int MixJuice(int[] arr, int n, int k) {
Arrays.sort(arr);
int sum=0;
for(int i=0;i<k;i++)
{
sum+=arr[i];
}
return sum;
}
public static void main(String[] args) {
Scanner s= new Scanner(System.in);
// char s1= s.next().charAt(0);
//
// if(s1 >='A' && s1 <= 'Z')
// System.out.println("A");
// else
// System.out.println("a");
int n = s.nextInt();
int k=s.nextInt();
int[] arr = new int[n];
for(int i=0;i<arr.length;i++)
{
arr[i]=s.nextInt();
}
int result=MixJuice(arr,n,k);
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.*;\nimport java.util.Arrays;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 全何種類で何種類買うか取得\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \t\n \t// 配列の作成\n \tint prices[] = new int[n];\n \tfor(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }\n\t\t//ソート\n \tArrays.sort(prices);\n \t//合計を求める\n \tint sum=0;\n \tfor(int i=0;i<k;i++){\n \tsum += prices[i];\n }\n\t\t// 出力\n\t\tSystem.out.println(sum);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 全何種類で何種類買うか取得\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \t\n \t// 配列の作成\n \tint prices[] = new int[n];\n \tfor(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }\n\t\t//ソート\n \tArrays.sort(prices);\n \t//合計を求める\n \tint sum=0;\n \tfor(int i=0;i<k;i++){\n \tsum += prices[i];\n }\n\t\t// 出力\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 全何種類で何種類買うか取得\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \t\n \t// 配列の作成\n \tint prices[] = new int[n];\n \tfor(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }\n\t\t//ソート\n \tArrays.sort(prices);\n \t//合計を求める\n \tint sum=0;\n \tfor(int i=0;i<k;i++){\n \tsum += prices[i];\n }\n\t\t// 出力\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 全何種類で何種類買うか取得\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \t\n \t// 配列の作成\n \tint prices[] = new int[n];\n \tfor(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }\n\t\t//ソート\n \tArrays.sort(prices);\n \t//合計を求める\n \tint sum=0;\n \tfor(int i=0;i<k;i++){\n \tsum += prices[i];\n }\n\t\t// 出力\n\t\tSystem.out.println(sum);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int prices[] = new int[n];",
"prices",
"new int[n]",
"n",
"for(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tprices[i] = sc.nextInt();\n }",
"{\n \tprices[i] = sc.nextInt();\n }",
"prices[i] = sc.nextInt()",
"prices[i]",
"prices",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(prices)",
"Arrays.sort",
"Arrays",
"prices",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;i++){\n \tsum += prices[i];\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \tsum += prices[i];\n }",
"{\n \tsum += prices[i];\n }",
"sum += prices[i]",
"sum",
"prices[i]",
"prices",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 全何種類で何種類買うか取得\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \t\n \t// 配列の作成\n \tint prices[] = new int[n];\n \tfor(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }\n\t\t//ソート\n \tArrays.sort(prices);\n \t//合計を求める\n \tint sum=0;\n \tfor(int i=0;i<k;i++){\n \tsum += prices[i];\n }\n\t\t// 出力\n\t\tSystem.out.println(sum);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 全何種類で何種類買うか取得\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \t\n \t// 配列の作成\n \tint prices[] = new int[n];\n \tfor(int i=0;i<n;i++){\n \tprices[i] = sc.nextInt();\n }\n\t\t//ソート\n \tArrays.sort(prices);\n \t//合計を求める\n \tint sum=0;\n \tfor(int i=0;i<k;i++){\n \tsum += prices[i];\n }\n\t\t// 出力\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main"
]
| import java.util.*;
import java.util.Arrays;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 全何種類で何種類買うか取得
int n = sc.nextInt();
int k = sc.nextInt();
// 配列の作成
int prices[] = new int[n];
for(int i=0;i<n;i++){
prices[i] = sc.nextInt();
}
//ソート
Arrays.sort(prices);
//合計を求める
int sum=0;
for(int i=0;i<k;i++){
sum += prices[i];
}
// 出力
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
97,
8
],
[
97,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
17,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
11,
39
],
[
39,
40
],
[
39,
41
],
[
11,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
11,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
11,
67
],
[
67,
68
],
[
67,
69
],
[
11,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
11,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
9,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] nk = scanner.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(nk[0]);\n\t\tint k = Integer.parseInt(nk[1]);\n\n\t\tint[] ar = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}\n\n\t\tArrays.sort(ar);\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] nk = scanner.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(nk[0]);\n\t\tint k = Integer.parseInt(nk[1]);\n\n\t\tint[] ar = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}\n\n\t\tArrays.sort(ar);\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] nk = scanner.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(nk[0]);\n\t\tint k = Integer.parseInt(nk[1]);\n\n\t\tint[] ar = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}\n\n\t\tArrays.sort(ar);\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] nk = scanner.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(nk[0]);\n\t\tint k = Integer.parseInt(nk[1]);\n\n\t\tint[] ar = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}\n\n\t\tArrays.sort(ar);\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String[] nk = scanner.nextLine().split(\" \");",
"nk",
"scanner.nextLine().split(\" \")",
"scanner.nextLine().split",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"\" \"",
"int n = Integer.parseInt(nk[0]);",
"n",
"Integer.parseInt(nk[0])",
"Integer.parseInt",
"Integer",
"nk[0]",
"nk",
"0",
"int k = Integer.parseInt(nk[1]);",
"k",
"Integer.parseInt(nk[1])",
"Integer.parseInt",
"Integer",
"nk[1]",
"nk",
"1",
"int[] ar = new int[n];",
"ar",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tar[i] = scanner.nextInt();\n\t\t}",
"{\n\t\t\tar[i] = scanner.nextInt();\n\t\t}",
"ar[i] = scanner.nextInt()",
"ar[i]",
"ar",
"i",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Arrays.sort(ar)",
"Arrays.sort",
"Arrays",
"ar",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tsum += ar[i];\n\t\t}",
"{\n\t\t\tsum += ar[i];\n\t\t}",
"sum += ar[i]",
"sum",
"ar[i]",
"ar",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] nk = scanner.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(nk[0]);\n\t\tint k = Integer.parseInt(nk[1]);\n\n\t\tint[] ar = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}\n\n\t\tArrays.sort(ar);\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] nk = scanner.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(nk[0]);\n\t\tint k = Integer.parseInt(nk[1]);\n\n\t\tint[] ar = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tar[i] = scanner.nextInt();\n\t\t}\n\n\t\tArrays.sort(ar);\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tsum += ar[i];\n\t\t}\n\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] nk = scanner.nextLine().split(" ");
int n = Integer.parseInt(nk[0]);
int k = Integer.parseInt(nk[1]);
int[] ar = new int[n];
for (int i = 0; i < n; i++) {
ar[i] = scanner.nextInt();
}
Arrays.sort(ar);
int sum = 0;
for (int i = 0; i < k; i++) {
sum += ar[i];
}
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
38,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
12,
13,
30,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
6
],
[
6,
7
],
[
107,
8
],
[
8,
9
],
[
107,
10
],
[
10,
11
],
[
107,
12
],
[
12,
13
],
[
107,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
16,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
107,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
34,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
50,
51
],
[
50,
52
],
[
39,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
107,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
75,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
80,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
107,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n main.show();\n }\n\n int n;\n int k;\n int[] p;\n int ans;\n\n public Main() {\n Scanner sc = new Scanner(System.in);\n try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }\n }\n \n void solve() {\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n }\n\n void show() {\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n main.show();\n }\n\n int n;\n int k;\n int[] p;\n int ans;\n\n public Main() {\n Scanner sc = new Scanner(System.in);\n try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }\n }\n \n void solve() {\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n }\n\n void show() {\n System.out.println(ans);\n }\n}",
"Main",
"int n;",
"n",
"int k;",
"k",
"int[] p;",
"p",
"int ans;",
"ans",
"public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n main.show();\n }",
"main",
"{\n Main main = new Main();\n main.solve();\n main.show();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.solve()",
"main.solve",
"main",
"main.show()",
"main.show",
"main",
"String[] args",
"args",
"public Main() {\n Scanner sc = new Scanner(System.in);\n try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }\n }",
"Main",
"{\n Scanner sc = new Scanner(System.in);\n try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }",
"{\n sc.close();\n }",
"sc.close()",
"sc.close",
"sc",
"{\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n }",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt()",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"p = new int[n]",
"p",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) p[i] = sc.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"p[i] = sc.nextInt();",
"p[i] = sc.nextInt()",
"p[i]",
"p",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"void solve() {\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n }",
"solve",
"{\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n }",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"for (int i = 0; i < k; i++) ans += p[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"ans += p[i];",
"ans += p[i]",
"ans",
"p[i]",
"p",
"i",
"void show() {\n System.out.println(ans);\n }",
"show",
"{\n System.out.println(ans);\n }",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n main.show();\n }\n\n int n;\n int k;\n int[] p;\n int ans;\n\n public Main() {\n Scanner sc = new Scanner(System.in);\n try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }\n }\n \n void solve() {\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n }\n\n void show() {\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n main.show();\n }\n\n int n;\n int k;\n int[] p;\n int ans;\n\n public Main() {\n Scanner sc = new Scanner(System.in);\n try {\n n = sc.nextInt();\n k = sc.nextInt();\n p = new int[n];\n for (int i = 0; i < n; i++) p[i] = sc.nextInt();\n } finally {\n sc.close();\n }\n }\n \n void solve() {\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n }\n\n void show() {\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
main.show();
}
int n;
int k;
int[] p;
int ans;
public Main() {
Scanner sc = new Scanner(System.in);
try {
n = sc.nextInt();
k = sc.nextInt();
p = new int[n];
for (int i = 0; i < n; i++) p[i] = sc.nextInt();
} finally {
sc.close();
}
}
void solve() {
Arrays.sort(p);
for (int i = 0; i < k; i++) ans += p[i];
}
void show() {
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
]
]
| [
"import java.util.*;\nclass Main{\n public static void main(String args[]){\n Scanner obj=new Scanner(System.in);\n int n=obj.nextInt();\n int m=obj.nextInt();\n int a[]=new int[n];\n for(int i=0;i<n;i++){\n\t\ta[i]=obj.nextInt();}\n Arrays.sort(a);\n int sum=0;\n for(int i=0;i<m;i++)\n sum=sum+a[i]; \n System.out.println(sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String args[]){\n Scanner obj=new Scanner(System.in);\n int n=obj.nextInt();\n int m=obj.nextInt();\n int a[]=new int[n];\n for(int i=0;i<n;i++){\n\t\ta[i]=obj.nextInt();}\n Arrays.sort(a);\n int sum=0;\n for(int i=0;i<m;i++)\n sum=sum+a[i]; \n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner obj=new Scanner(System.in);\n int n=obj.nextInt();\n int m=obj.nextInt();\n int a[]=new int[n];\n for(int i=0;i<n;i++){\n\t\ta[i]=obj.nextInt();}\n Arrays.sort(a);\n int sum=0;\n for(int i=0;i<m;i++)\n sum=sum+a[i]; \n System.out.println(sum);\n }",
"main",
"{\n Scanner obj=new Scanner(System.in);\n int n=obj.nextInt();\n int m=obj.nextInt();\n int a[]=new int[n];\n for(int i=0;i<n;i++){\n\t\ta[i]=obj.nextInt();}\n Arrays.sort(a);\n int sum=0;\n for(int i=0;i<m;i++)\n sum=sum+a[i]; \n System.out.println(sum);\n }",
"Scanner obj=new Scanner(System.in);",
"obj",
"new Scanner(System.in)",
"int n=obj.nextInt();",
"n",
"obj.nextInt()",
"obj.nextInt",
"obj",
"int m=obj.nextInt();",
"m",
"obj.nextInt()",
"obj.nextInt",
"obj",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0;i<n;i++){\n\t\ta[i]=obj.nextInt();}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\ta[i]=obj.nextInt();}",
"{\n\t\ta[i]=obj.nextInt();}",
"a[i]=obj.nextInt()",
"a[i]",
"a",
"i",
"obj.nextInt()",
"obj.nextInt",
"obj",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<m;i++)\n sum=sum+a[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"sum=sum+a[i];",
"sum=sum+a[i]",
"sum",
"sum+a[i]",
"sum",
"a[i]",
"a",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String args[]",
"args"
]
| import java.util.*;
class Main{
public static void main(String args[]){
Scanner obj=new Scanner(System.in);
int n=obj.nextInt();
int m=obj.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++){
a[i]=obj.nextInt();}
Arrays.sort(a);
int sum=0;
for(int i=0;i<m;i++)
sum=sum+a[i];
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
87,
8
],
[
87,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
29,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
11,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
11,
55
],
[
55,
56
],
[
55,
57
],
[
11,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
11,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
9,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"\timport java.util.Scanner;\n\timport java.util.Arrays;\n\n\tpublic class Main{\n\n\t\tpublic static void main(String[] args){\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint type = sc.nextInt();\n\t\t\tint buy = sc.nextInt();\n\t\t\tint typeArray[] = new int[type];\n\n\t\t\tfor(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(typeArray);\n\n\t\t\tint sum =0;\n\t\t\tfor(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main{\n\n\t\tpublic static void main(String[] args){\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint type = sc.nextInt();\n\t\t\tint buy = sc.nextInt();\n\t\t\tint typeArray[] = new int[type];\n\n\t\t\tfor(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(typeArray);\n\n\t\t\tint sum =0;\n\t\t\tfor(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint type = sc.nextInt();\n\t\t\tint buy = sc.nextInt();\n\t\t\tint typeArray[] = new int[type];\n\n\t\t\tfor(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(typeArray);\n\n\t\t\tint sum =0;\n\t\t\tfor(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint type = sc.nextInt();\n\t\t\tint buy = sc.nextInt();\n\t\t\tint typeArray[] = new int[type];\n\n\t\t\tfor(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(typeArray);\n\n\t\t\tint sum =0;\n\t\t\tfor(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int type = sc.nextInt();",
"type",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int buy = sc.nextInt();",
"buy",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int typeArray[] = new int[type];",
"typeArray",
"new int[type]",
"type",
"for(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<typeArray.length",
"i",
"typeArray.length",
"typeArray",
"typeArray.length",
"i++",
"i++",
"i",
"{\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}",
"{\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}",
"typeArray[i]=sc.nextInt()",
"typeArray[i]",
"typeArray",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(typeArray)",
"Arrays.sort",
"Arrays",
"typeArray",
"int sum =0;",
"sum",
"0",
"for(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<buy",
"j",
"buy",
"j++",
"j++",
"j",
"{\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}",
"{\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}",
"sum = sum + typeArray[j]",
"sum",
"sum + typeArray[j]",
"sum",
"typeArray[j]",
"typeArray",
"j",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main{\n\n\t\tpublic static void main(String[] args){\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint type = sc.nextInt();\n\t\t\tint buy = sc.nextInt();\n\t\t\tint typeArray[] = new int[type];\n\n\t\t\tfor(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(typeArray);\n\n\t\t\tint sum =0;\n\t\t\tfor(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"public class Main{\n\n\t\tpublic static void main(String[] args){\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint type = sc.nextInt();\n\t\t\tint buy = sc.nextInt();\n\t\t\tint typeArray[] = new int[type];\n\n\t\t\tfor(int i=0; i<typeArray.length; i++){\n\t\t\t\ttypeArray[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(typeArray);\n\n\t\t\tint sum =0;\n\t\t\tfor(int j=0; j<buy; j++){\n\t\t\t\tsum = sum + typeArray[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int type = sc.nextInt();
int buy = sc.nextInt();
int typeArray[] = new int[type];
for(int i=0; i<typeArray.length; i++){
typeArray[i]=sc.nextInt();
}
Arrays.sort(typeArray);
int sum =0;
for(int j=0; j<buy; j++){
sum = sum + typeArray[j];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
13,
17,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
18,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
18,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
12,
13,
30,
29,
4,
18,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
17,
14,
2,
13,
17,
0,
13,
20,
0,
13,
20,
14,
2,
13,
17,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
4,
18,
13,
4,
18,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
0,
18,
13,
13,
18,
13,
17,
0,
18,
13,
13,
18,
13,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
41,
13,
17,
42,
2,
2,
13,
13,
17,
30,
0,
13,
13,
40,
13,
0,
13,
4,
13,
13,
14,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
42,
2,
2,
13,
13,
13,
30,
0,
13,
13,
40,
13,
29,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
13,
41,
13,
2,
13,
17,
4,
18,
18,
13,
13,
17,
13,
13,
41,
13,
2,
2,
13,
13,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
18,
13,
17,
41,
13,
18,
13,
17,
0,
13,
4,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
14,
2,
2,
17,
13,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
610,
11
],
[
610,
12
],
[
12,
13
],
[
610,
14
],
[
14,
15
],
[
14,
16
],
[
610,
17
],
[
17,
18
],
[
17,
19
],
[
610,
20
],
[
20,
21
],
[
20,
22
],
[
610,
23
],
[
23,
24
],
[
23,
25
],
[
610,
26
],
[
26,
27
],
[
26,
28
],
[
610,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
31,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
31,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
29,
49
],
[
49,
50
],
[
29,
51
],
[
51,
52
],
[
29,
53
],
[
53,
54
],
[
610,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
59,
64
],
[
610,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
73,
74
],
[
610,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
77,
87
],
[
87,
88
],
[
87,
89
],
[
77,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
77,
113
],
[
113,
114
],
[
610,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
117,
127
],
[
127,
128
],
[
127,
129
],
[
117,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
136,
138
],
[
131,
139
],
[
139,
140
],
[
140,
141
],
[
131,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
147,
148
],
[
148,
149
],
[
147,
150
],
[
150,
151
],
[
150,
152
],
[
117,
153
],
[
153,
154
],
[
610,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
155,
164
],
[
164,
165
],
[
610,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
177,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
187,
189
],
[
176,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
192,
194
],
[
176,
195
],
[
195,
196
],
[
195,
197
],
[
176,
198
],
[
198,
199
],
[
198,
200
],
[
168,
201
],
[
201,
202
],
[
166,
203
],
[
203,
204
],
[
166,
205
],
[
205,
206
],
[
610,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
209,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
220,
221
],
[
220,
222
],
[
216,
223
],
[
223,
224
],
[
223,
225
],
[
209,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
233,
238
],
[
230,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
209,
246
],
[
246,
247
],
[
247,
248
],
[
209,
249
],
[
249,
250
],
[
250,
251
],
[
207,
252
],
[
252,
253
],
[
610,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
256,
261
],
[
261,
262
],
[
261,
263
],
[
256,
265
],
[
265,
266
],
[
265,
267
],
[
256,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
269,
274
],
[
274,
275
],
[
274,
276
],
[
269,
277
],
[
277,
278
],
[
278,
279
],
[
269,
280
],
[
281,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
281,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
290,
291
],
[
290,
292
],
[
281,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
297,
298
],
[
297,
299
],
[
256,
300
],
[
300,
301
],
[
300,
302
],
[
256,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
303,
308
],
[
308,
309
],
[
308,
310
],
[
303,
311
],
[
311,
312
],
[
312,
313
],
[
303,
314
],
[
315,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
320,
322
],
[
316,
323
],
[
323,
324
],
[
323,
325
],
[
316,
326
],
[
326,
327
],
[
327,
328
],
[
316,
329
],
[
330,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
334,
335
],
[
335,
336
],
[
335,
337
],
[
334,
338
],
[
338,
339
],
[
338,
340
],
[
333,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
341,
345
],
[
345,
346
],
[
345,
347
],
[
332,
348
],
[
331,
349
],
[
349,
350
],
[
256,
351
],
[
351,
352
],
[
352,
353
],
[
353,
354
],
[
353,
355
],
[
351,
356
],
[
610,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
362,
365
],
[
365,
366
],
[
366,
367
],
[
359,
368
],
[
368,
369
],
[
368,
370
],
[
359,
371
],
[
371,
372
],
[
371,
373
],
[
373,
374
],
[
374,
375
],
[
373,
376
],
[
359,
377
],
[
377,
378
],
[
378,
379
],
[
379,
380
],
[
379,
381
],
[
377,
382
],
[
382,
383
],
[
382,
384
],
[
377,
385
],
[
385,
386
],
[
386,
387
],
[
377,
388
],
[
389,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
390,
396
],
[
396,
397
],
[
397,
398
],
[
397,
399
],
[
396,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
401,
405
],
[
400,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
406,
410
],
[
410,
411
],
[
396,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
414,
416
],
[
359,
417
],
[
417,
418
],
[
418,
419
],
[
418,
420
],
[
417,
421
],
[
421,
422
],
[
359,
423
],
[
423,
424
],
[
424,
425
],
[
425,
426
],
[
425,
427
],
[
423,
428
],
[
610,
429
],
[
429,
430
],
[
429,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
431,
435
],
[
435,
436
],
[
435,
437
],
[
431,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
439,
443
],
[
438,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
444,
448
],
[
448,
449
],
[
431,
450
],
[
450,
451
],
[
451,
452
],
[
451,
453
],
[
429,
454
],
[
454,
455
],
[
610,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
459,
460
],
[
459,
461
],
[
461,
462
],
[
458,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
466,
467
],
[
465,
468
],
[
468,
469
],
[
468,
470
],
[
458,
471
],
[
471,
472
],
[
471,
473
],
[
473,
474
],
[
474,
475
],
[
473,
476
],
[
476,
477
],
[
476,
478
],
[
458,
479
],
[
479,
480
],
[
479,
481
],
[
458,
482
],
[
482,
483
],
[
482,
484
],
[
484,
485
],
[
484,
486
],
[
458,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
487,
492
],
[
487,
493
],
[
487,
494
],
[
458,
495
],
[
495,
496
],
[
495,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
497,
501
],
[
458,
502
],
[
502,
503
],
[
503,
504
],
[
504,
505
],
[
504,
506
],
[
502,
507
],
[
610,
508
],
[
508,
509
],
[
508,
510
],
[
510,
511
],
[
511,
512
],
[
512,
513
],
[
512,
514
],
[
511,
515
],
[
515,
516
],
[
510,
517
],
[
517,
518
],
[
518,
519
],
[
518,
520
],
[
518,
521
],
[
521,
522
],
[
521,
523
],
[
508,
524
],
[
524,
525
],
[
508,
526
],
[
526,
527
],
[
610,
528
],
[
528,
529
],
[
528,
530
],
[
530,
531
],
[
531,
532
],
[
531,
533
],
[
533,
534
],
[
530,
535
],
[
535,
536
],
[
535,
537
],
[
537,
538
],
[
537,
539
],
[
530,
540
],
[
540,
541
],
[
540,
542
],
[
542,
543
],
[
542,
544
],
[
530,
545
],
[
545,
546
],
[
545,
547
],
[
547,
548
],
[
530,
549
],
[
549,
550
],
[
550,
551
],
[
549,
552
],
[
530,
553
],
[
553,
554
],
[
553,
555
],
[
530,
556
],
[
556,
557
],
[
557,
558
],
[
558,
559
],
[
558,
560
],
[
556,
561
],
[
561,
562
],
[
561,
563
],
[
556,
564
],
[
564,
565
],
[
565,
566
],
[
556,
567
],
[
567,
568
],
[
568,
569
],
[
568,
570
],
[
570,
571
],
[
570,
572
],
[
530,
573
],
[
573,
574
],
[
574,
575
],
[
575,
576
],
[
575,
577
],
[
573,
578
],
[
610,
579
],
[
579,
580
],
[
579,
581
],
[
581,
582
],
[
582,
583
],
[
582,
584
],
[
584,
585
],
[
585,
586
],
[
581,
587
],
[
587,
588
],
[
587,
589
],
[
589,
590
],
[
590,
591
],
[
589,
592
],
[
581,
593
],
[
593,
594
],
[
594,
595
],
[
595,
596
],
[
595,
597
],
[
594,
598
],
[
598,
599
],
[
598,
600
],
[
593,
601
],
[
601,
602
],
[
602,
603
],
[
601,
604
],
[
593,
605
],
[
605,
606
],
[
606,
607
],
[
605,
608
],
[
0,
609
],
[
609,
610
],
[
609,
611
]
]
| [
"import java.math.*;\nimport java.util.*;\nimport java.io.*;\n \npublic class Main { \n \n static BufferedReader in;\n static PrintWriter out = new PrintWriter(System.out);\n static String file = \"../in\";\n static int test = 10; // 0 for local testing, 1 for std input\n static int inf = 1_000_000, mod = 1_000_000_007;\n\n\n\n void swap(int[]ary, int i, int j)\n {\n int t = ary[i];\n ary[i] = ary[j];\n ary[j] = t;\n }\n \n String[] split() throws Exception\n {\n return in.readLine().split(\" \");\n }\n\n int readInt() throws Exception\n {\n return Integer.valueOf(in.readLine());\n }\n\n long[] toLongArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n long[] ary = new long[n];\n for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);\n return ary;\n }\n\n int[] toIntArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n int[] ary = new int[n];\n for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);\n return ary;\n }\n\n String reverse(String str)\n {\n return new StringBuilder(str).reverse().toString();\n }\n\n\n long pow(long a, int pow)\n {\n long res = 1;\n while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }\n\n return res;\n }\n\n public static void main(String[] args) throws Exception\n {\n int _k = Integer.valueOf(\"1\");\n if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));\n if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n // System.out.println((-100 + 0) / 2);\n\n // char[] c = new char[4];\n // c[1] = '.';\n // for(char i = '0'; i <= '9'; i++)\n // {\n // for(char j = '0'; j <= '9'; j++)\n // {\n // for(char k = '0'; k <= '9'; k++)\n // {\n // c[0] = i;\n // c[2] = j;\n // c[3] = k;\n // double d = Double.valueOf(String.valueOf(c));\n // int v = (int)(d * 100);\n // String s1 = String.valueOf(\"\" + c[0] + c[2] + c[3]),\n // s2 = String.valueOf(v);\n // System.out.printf(\"%s %s %b\\n\", s1, s2, s1.equals(s2));\n // }\n // }\n // }\n\n\n new Main().b();\n out.flush();\n }\n\n void e() throws Exception\n {\n int n = readInt();\n long[] a = new long[n], b = new long[n];\n for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }\n \n long re = n;\n for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }\n System.out.println(re);\n \n }\n\n void d() throws Exception\n {\n long n = Long.valueOf(in.readLine());\n int step = 0;\n int sqrt = (int) Math.sqrt(n);\n for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }\n if(n > 1) step++;\n \n System.out.println(step);\n }\n\n int count(int k)\n {\n int sum = 0, cur = 0;\n while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }\n return cur - 1;\n }\n\n\n void c() throws Exception\n {\n String[] str = split();\n double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);\n long first = (long) a;\n int mul = (int) (b * 100);\n System.out.printf(\"%d %d\\n\", first, mul);\n long sum = first * mul / 100;\n System.out.println(sum);\n }\n\n int gcd(int a, int b)\n {\n if(b == 0) return a;\n return gcd(b, a % b);\n }\n\n void b() throws Exception\n {\n int[] ary = toIntArray();\n int n = ary[0], k = ary[1];\n ary = toIntArray();\n Arrays.sort(ary);\n int sum = 0;\n for(int i = 0; i < k; i++)\n sum += ary[i];\n System.out.println(sum);\n }\n\n void a() throws Exception\n {\n String str = in.readLine();\n char c = str.charAt(0);\n if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');\n }\n}",
"import java.math.*;",
"math.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main { \n \n static BufferedReader in;\n static PrintWriter out = new PrintWriter(System.out);\n static String file = \"../in\";\n static int test = 10; // 0 for local testing, 1 for std input\n static int inf = 1_000_000, mod = 1_000_000_007;\n\n\n\n void swap(int[]ary, int i, int j)\n {\n int t = ary[i];\n ary[i] = ary[j];\n ary[j] = t;\n }\n \n String[] split() throws Exception\n {\n return in.readLine().split(\" \");\n }\n\n int readInt() throws Exception\n {\n return Integer.valueOf(in.readLine());\n }\n\n long[] toLongArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n long[] ary = new long[n];\n for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);\n return ary;\n }\n\n int[] toIntArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n int[] ary = new int[n];\n for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);\n return ary;\n }\n\n String reverse(String str)\n {\n return new StringBuilder(str).reverse().toString();\n }\n\n\n long pow(long a, int pow)\n {\n long res = 1;\n while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }\n\n return res;\n }\n\n public static void main(String[] args) throws Exception\n {\n int _k = Integer.valueOf(\"1\");\n if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));\n if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n // System.out.println((-100 + 0) / 2);\n\n // char[] c = new char[4];\n // c[1] = '.';\n // for(char i = '0'; i <= '9'; i++)\n // {\n // for(char j = '0'; j <= '9'; j++)\n // {\n // for(char k = '0'; k <= '9'; k++)\n // {\n // c[0] = i;\n // c[2] = j;\n // c[3] = k;\n // double d = Double.valueOf(String.valueOf(c));\n // int v = (int)(d * 100);\n // String s1 = String.valueOf(\"\" + c[0] + c[2] + c[3]),\n // s2 = String.valueOf(v);\n // System.out.printf(\"%s %s %b\\n\", s1, s2, s1.equals(s2));\n // }\n // }\n // }\n\n\n new Main().b();\n out.flush();\n }\n\n void e() throws Exception\n {\n int n = readInt();\n long[] a = new long[n], b = new long[n];\n for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }\n \n long re = n;\n for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }\n System.out.println(re);\n \n }\n\n void d() throws Exception\n {\n long n = Long.valueOf(in.readLine());\n int step = 0;\n int sqrt = (int) Math.sqrt(n);\n for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }\n if(n > 1) step++;\n \n System.out.println(step);\n }\n\n int count(int k)\n {\n int sum = 0, cur = 0;\n while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }\n return cur - 1;\n }\n\n\n void c() throws Exception\n {\n String[] str = split();\n double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);\n long first = (long) a;\n int mul = (int) (b * 100);\n System.out.printf(\"%d %d\\n\", first, mul);\n long sum = first * mul / 100;\n System.out.println(sum);\n }\n\n int gcd(int a, int b)\n {\n if(b == 0) return a;\n return gcd(b, a % b);\n }\n\n void b() throws Exception\n {\n int[] ary = toIntArray();\n int n = ary[0], k = ary[1];\n ary = toIntArray();\n Arrays.sort(ary);\n int sum = 0;\n for(int i = 0; i < k; i++)\n sum += ary[i];\n System.out.println(sum);\n }\n\n void a() throws Exception\n {\n String str = in.readLine();\n char c = str.charAt(0);\n if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');\n }\n}",
"Main",
"static BufferedReader in;",
"in",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static String file = \"../in\";",
"file",
"\"../in\"",
"static int test = 10; // 0 for local testing, 1 for std input",
"test",
"10",
"static int inf = 1_000_000",
"inf",
"1_000_000",
"mod = 1_000_000_007;",
"mod",
"1_000_000_007",
"void swap(int[]ary, int i, int j)\n {\n int t = ary[i];\n ary[i] = ary[j];\n ary[j] = t;\n }",
"swap",
"{\n int t = ary[i];\n ary[i] = ary[j];\n ary[j] = t;\n }",
"int t = ary[i];",
"t",
"ary[i]",
"ary",
"i",
"ary[i] = ary[j]",
"ary[i]",
"ary",
"i",
"ary[j]",
"ary",
"j",
"ary[j] = t",
"ary[j]",
"ary",
"j",
"t",
"int[]ary",
"ary",
"int i",
"i",
"int j",
"j",
"String[] split() throws Exception\n {\n return in.readLine().split(\" \");\n }",
"split",
"{\n return in.readLine().split(\" \");\n }",
"return in.readLine().split(\" \");",
"in.readLine().split(\" \")",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"\" \"",
"int readInt() throws Exception\n {\n return Integer.valueOf(in.readLine());\n }",
"readInt",
"{\n return Integer.valueOf(in.readLine());\n }",
"return Integer.valueOf(in.readLine());",
"Integer.valueOf(in.readLine())",
"Integer.valueOf",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"long[] toLongArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n long[] ary = new long[n];\n for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);\n return ary;\n }",
"toLongArray",
"{\n String[] sp = split();\n int n = sp.length;\n long[] ary = new long[n];\n for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);\n return ary;\n }",
"String[] sp = split();",
"sp",
"split()",
"split",
"int n = sp.length;",
"n",
"sp.length",
"sp",
"sp.length",
"long[] ary = new long[n];",
"ary",
"new long[n]",
"n",
"for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"ary[i] = Long.valueOf(sp[i]);",
"ary[i] = Long.valueOf(sp[i])",
"ary[i]",
"ary",
"i",
"Long.valueOf(sp[i])",
"Long.valueOf",
"Long",
"sp[i]",
"sp",
"i",
"return ary;",
"ary",
"int[] toIntArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n int[] ary = new int[n];\n for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);\n return ary;\n }",
"toIntArray",
"{\n String[] sp = split();\n int n = sp.length;\n int[] ary = new int[n];\n for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);\n return ary;\n }",
"String[] sp = split();",
"sp",
"split()",
"split",
"int n = sp.length;",
"n",
"sp.length",
"sp",
"sp.length",
"int[] ary = new int[n];",
"ary",
"new int[n]",
"n",
"for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"ary[i] = Integer.valueOf(sp[i]);",
"ary[i] = Integer.valueOf(sp[i])",
"ary[i]",
"ary",
"i",
"Integer.valueOf(sp[i])",
"Integer.valueOf",
"Integer",
"sp[i]",
"sp",
"i",
"return ary;",
"ary",
"String reverse(String str)\n {\n return new StringBuilder(str).reverse().toString();\n }",
"reverse",
"{\n return new StringBuilder(str).reverse().toString();\n }",
"return new StringBuilder(str).reverse().toString();",
"new StringBuilder(str).reverse().toString()",
"new StringBuilder(str).reverse().toString",
"new StringBuilder(str).reverse()",
"new StringBuilder(str).reverse",
"new StringBuilder(str)",
"String str",
"str",
"long pow(long a, int pow)\n {\n long res = 1;\n while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }\n\n return res;\n }",
"pow",
"{\n long res = 1;\n while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }\n\n return res;\n }",
"long res = 1;",
"res",
"1",
"while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }",
"pow > 0",
"pow",
"0",
"{\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }",
"if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }",
"pow % 2 != 0",
"pow % 2",
"pow",
"2",
"0",
"{\n res *= a;\n res %= mod;\n }",
"res *= a",
"res",
"a",
"res %= mod",
"res",
"mod",
"a = a * a",
"a",
"a * a",
"a",
"a",
"a %= mod",
"a",
"mod",
"pow /= 2",
"pow",
"2",
"return res;",
"res",
"long a",
"a",
"int pow",
"pow",
"public static void main(String[] args) throws Exception\n {\n int _k = Integer.valueOf(\"1\");\n if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));\n if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n // System.out.println((-100 + 0) / 2);\n\n // char[] c = new char[4];\n // c[1] = '.';\n // for(char i = '0'; i <= '9'; i++)\n // {\n // for(char j = '0'; j <= '9'; j++)\n // {\n // for(char k = '0'; k <= '9'; k++)\n // {\n // c[0] = i;\n // c[2] = j;\n // c[3] = k;\n // double d = Double.valueOf(String.valueOf(c));\n // int v = (int)(d * 100);\n // String s1 = String.valueOf(\"\" + c[0] + c[2] + c[3]),\n // s2 = String.valueOf(v);\n // System.out.printf(\"%s %s %b\\n\", s1, s2, s1.equals(s2));\n // }\n // }\n // }\n\n\n new Main().b();\n out.flush();\n }",
"main",
"{\n int _k = Integer.valueOf(\"1\");\n if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));\n if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n // System.out.println((-100 + 0) / 2);\n\n // char[] c = new char[4];\n // c[1] = '.';\n // for(char i = '0'; i <= '9'; i++)\n // {\n // for(char j = '0'; j <= '9'; j++)\n // {\n // for(char k = '0'; k <= '9'; k++)\n // {\n // c[0] = i;\n // c[2] = j;\n // c[3] = k;\n // double d = Double.valueOf(String.valueOf(c));\n // int v = (int)(d * 100);\n // String s1 = String.valueOf(\"\" + c[0] + c[2] + c[3]),\n // s2 = String.valueOf(v);\n // System.out.printf(\"%s %s %b\\n\", s1, s2, s1.equals(s2));\n // }\n // }\n // }\n\n\n new Main().b();\n out.flush();\n }",
"int _k = Integer.valueOf(\"1\");",
"_k",
"Integer.valueOf(\"1\")",
"Integer.valueOf",
"Integer",
"\"1\"",
"if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));",
"test > 0",
"test",
"0",
"in = new BufferedReader(new InputStreamReader(System.in))",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"in = new BufferedReader(new FileReader(file))",
"in",
"new BufferedReader(new FileReader(file))",
"if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}",
"test < 0",
"test",
"0",
"{String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}",
"String[] str = in.readLine().split(\" \");",
"str",
"in.readLine().split(\" \")",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"\" \"",
"char[] gg = in.readLine().toCharArray();",
"gg",
"in.readLine().toCharArray()",
"in.readLine().toCharArray",
"in.readLine()",
"in.readLine",
"in",
"new Main().b()",
"new Main().b",
"new Main()",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"void e() throws Exception\n {\n int n = readInt();\n long[] a = new long[n], b = new long[n];\n for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }\n \n long re = n;\n for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }\n System.out.println(re);\n \n }",
"e",
"{\n int n = readInt();\n long[] a = new long[n], b = new long[n];\n for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }\n \n long re = n;\n for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }\n System.out.println(re);\n \n }",
"int n = readInt();",
"n",
"readInt()",
"readInt",
"long[] a = new long[n]",
"a",
"new long[n]",
"n",
"b = new long[n];",
"b",
"new long[n]",
"n",
"for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }",
"{\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }",
"long[] ary = toLongArray();",
"ary",
"toLongArray()",
"toLongArray",
"a[i] = ary[0]",
"a[i]",
"a",
"i",
"ary[0]",
"ary",
"0",
"b[i] = ary[1]",
"b[i]",
"b",
"i",
"ary[1]",
"ary",
"1",
"long re = n;",
"re",
"n",
"for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }",
"{\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }",
"for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }",
"int j = i + 1;",
"int j = i + 1;",
"j",
"i + 1",
"i",
"1",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }",
"{\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }",
"if(a[i] * a[j] + b[i] * b[j] != 0) re++;",
"a[i] * a[j] + b[i] * b[j] != 0",
"a[i] * a[j] + b[i] * b[j]",
"a[i] * a[j]",
"a[i]",
"a",
"i",
"a[j]",
"a",
"j",
"b[i] * b[j]",
"b[i]",
"b",
"i",
"b[j]",
"b",
"j",
"0",
"re++",
"re",
"System.out.println(re)",
"System.out.println",
"System.out",
"System",
"System.out",
"re",
"void d() throws Exception\n {\n long n = Long.valueOf(in.readLine());\n int step = 0;\n int sqrt = (int) Math.sqrt(n);\n for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }\n if(n > 1) step++;\n \n System.out.println(step);\n }",
"d",
"{\n long n = Long.valueOf(in.readLine());\n int step = 0;\n int sqrt = (int) Math.sqrt(n);\n for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }\n if(n > 1) step++;\n \n System.out.println(step);\n }",
"long n = Long.valueOf(in.readLine());",
"n",
"Long.valueOf(in.readLine())",
"Long.valueOf",
"Long",
"in.readLine()",
"in.readLine",
"in",
"int step = 0;",
"step",
"0",
"int sqrt = (int) Math.sqrt(n);",
"sqrt",
"(int) Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < sqrt",
"i",
"sqrt",
"i++",
"i++",
"i",
"{\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }",
"{\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }",
"if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }",
"int counter = 0;",
"counter",
"0",
"while(n % i == 0)\n {\n n /= i;\n counter++;\n }",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n n /= i;\n counter++;\n }",
"n /= i",
"n",
"i",
"counter++",
"counter",
"step += count(counter)",
"step",
"count(counter)",
"count",
"counter",
"if(n > 1) step++;",
"n > 1",
"n",
"1",
"step++",
"step",
"System.out.println(step)",
"System.out.println",
"System.out",
"System",
"System.out",
"step",
"int count(int k)\n {\n int sum = 0, cur = 0;\n while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }\n return cur - 1;\n }",
"count",
"{\n int sum = 0, cur = 0;\n while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }\n return cur - 1;\n }",
"int sum = 0",
"sum",
"0",
"cur = 0;",
"cur",
"0",
"while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }",
"sum + cur <= k",
"sum + cur",
"sum",
"cur",
"k",
"{\n sum += cur;\n cur++;\n }",
"sum += cur",
"sum",
"cur",
"cur++",
"cur",
"return cur - 1;",
"cur - 1",
"cur",
"1",
"int k",
"k",
"void c() throws Exception\n {\n String[] str = split();\n double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);\n long first = (long) a;\n int mul = (int) (b * 100);\n System.out.printf(\"%d %d\\n\", first, mul);\n long sum = first * mul / 100;\n System.out.println(sum);\n }",
"c",
"{\n String[] str = split();\n double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);\n long first = (long) a;\n int mul = (int) (b * 100);\n System.out.printf(\"%d %d\\n\", first, mul);\n long sum = first * mul / 100;\n System.out.println(sum);\n }",
"String[] str = split();",
"str",
"split()",
"split",
"double a = Double.valueOf(str[0])",
"a",
"Double.valueOf(str[0])",
"Double.valueOf",
"Double",
"str[0]",
"str",
"0",
"b = Double.valueOf(str[1]);",
"b",
"Double.valueOf(str[1])",
"Double.valueOf",
"Double",
"str[1]",
"str",
"1",
"long first = (long) a;",
"first",
"(long) a",
"int mul = (int) (b * 100);",
"mul",
"(int) (b * 100)",
"b",
"100",
"System.out.printf(\"%d %d\\n\", first, mul)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"first",
"mul",
"long sum = first * mul / 100;",
"sum",
"first * mul / 100",
"first * mul",
"first",
"mul",
"100",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"int gcd(int a, int b)\n {\n if(b == 0) return a;\n return gcd(b, a % b);\n }",
"gcd",
"{\n if(b == 0) return a;\n return gcd(b, a % b);\n }",
"if(b == 0) return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"void b() throws Exception\n {\n int[] ary = toIntArray();\n int n = ary[0], k = ary[1];\n ary = toIntArray();\n Arrays.sort(ary);\n int sum = 0;\n for(int i = 0; i < k; i++)\n sum += ary[i];\n System.out.println(sum);\n }",
"b",
"{\n int[] ary = toIntArray();\n int n = ary[0], k = ary[1];\n ary = toIntArray();\n Arrays.sort(ary);\n int sum = 0;\n for(int i = 0; i < k; i++)\n sum += ary[i];\n System.out.println(sum);\n }",
"int[] ary = toIntArray();",
"ary",
"toIntArray()",
"toIntArray",
"int n = ary[0]",
"n",
"ary[0]",
"ary",
"0",
"k = ary[1];",
"k",
"ary[1]",
"ary",
"1",
"ary = toIntArray()",
"ary",
"toIntArray()",
"toIntArray",
"Arrays.sort(ary)",
"Arrays.sort",
"Arrays",
"ary",
"int sum = 0;",
"sum",
"0",
"for(int i = 0; i < k; i++)\n sum += ary[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"sum += ary[i];",
"sum += ary[i]",
"sum",
"ary[i]",
"ary",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"void a() throws Exception\n {\n String str = in.readLine();\n char c = str.charAt(0);\n if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');\n }",
"a",
"{\n String str = in.readLine();\n char c = str.charAt(0);\n if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');\n }",
"String str = in.readLine();",
"str",
"in.readLine()",
"in.readLine",
"in",
"char c = str.charAt(0);",
"c",
"str.charAt(0)",
"str.charAt",
"str",
"0",
"if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');",
"'a' <= c && c <= 'z'",
"'a' <= c",
"'a'",
"c",
"c <= 'z'",
"c",
"'z'",
"out.println('a')",
"out.println",
"out",
"'a'",
"out.println('A')",
"out.println",
"out",
"'A'",
"public class Main { \n \n static BufferedReader in;\n static PrintWriter out = new PrintWriter(System.out);\n static String file = \"../in\";\n static int test = 10; // 0 for local testing, 1 for std input\n static int inf = 1_000_000, mod = 1_000_000_007;\n\n\n\n void swap(int[]ary, int i, int j)\n {\n int t = ary[i];\n ary[i] = ary[j];\n ary[j] = t;\n }\n \n String[] split() throws Exception\n {\n return in.readLine().split(\" \");\n }\n\n int readInt() throws Exception\n {\n return Integer.valueOf(in.readLine());\n }\n\n long[] toLongArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n long[] ary = new long[n];\n for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);\n return ary;\n }\n\n int[] toIntArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n int[] ary = new int[n];\n for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);\n return ary;\n }\n\n String reverse(String str)\n {\n return new StringBuilder(str).reverse().toString();\n }\n\n\n long pow(long a, int pow)\n {\n long res = 1;\n while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }\n\n return res;\n }\n\n public static void main(String[] args) throws Exception\n {\n int _k = Integer.valueOf(\"1\");\n if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));\n if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n // System.out.println((-100 + 0) / 2);\n\n // char[] c = new char[4];\n // c[1] = '.';\n // for(char i = '0'; i <= '9'; i++)\n // {\n // for(char j = '0'; j <= '9'; j++)\n // {\n // for(char k = '0'; k <= '9'; k++)\n // {\n // c[0] = i;\n // c[2] = j;\n // c[3] = k;\n // double d = Double.valueOf(String.valueOf(c));\n // int v = (int)(d * 100);\n // String s1 = String.valueOf(\"\" + c[0] + c[2] + c[3]),\n // s2 = String.valueOf(v);\n // System.out.printf(\"%s %s %b\\n\", s1, s2, s1.equals(s2));\n // }\n // }\n // }\n\n\n new Main().b();\n out.flush();\n }\n\n void e() throws Exception\n {\n int n = readInt();\n long[] a = new long[n], b = new long[n];\n for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }\n \n long re = n;\n for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }\n System.out.println(re);\n \n }\n\n void d() throws Exception\n {\n long n = Long.valueOf(in.readLine());\n int step = 0;\n int sqrt = (int) Math.sqrt(n);\n for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }\n if(n > 1) step++;\n \n System.out.println(step);\n }\n\n int count(int k)\n {\n int sum = 0, cur = 0;\n while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }\n return cur - 1;\n }\n\n\n void c() throws Exception\n {\n String[] str = split();\n double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);\n long first = (long) a;\n int mul = (int) (b * 100);\n System.out.printf(\"%d %d\\n\", first, mul);\n long sum = first * mul / 100;\n System.out.println(sum);\n }\n\n int gcd(int a, int b)\n {\n if(b == 0) return a;\n return gcd(b, a % b);\n }\n\n void b() throws Exception\n {\n int[] ary = toIntArray();\n int n = ary[0], k = ary[1];\n ary = toIntArray();\n Arrays.sort(ary);\n int sum = 0;\n for(int i = 0; i < k; i++)\n sum += ary[i];\n System.out.println(sum);\n }\n\n void a() throws Exception\n {\n String str = in.readLine();\n char c = str.charAt(0);\n if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');\n }\n}",
"public class Main { \n \n static BufferedReader in;\n static PrintWriter out = new PrintWriter(System.out);\n static String file = \"../in\";\n static int test = 10; // 0 for local testing, 1 for std input\n static int inf = 1_000_000, mod = 1_000_000_007;\n\n\n\n void swap(int[]ary, int i, int j)\n {\n int t = ary[i];\n ary[i] = ary[j];\n ary[j] = t;\n }\n \n String[] split() throws Exception\n {\n return in.readLine().split(\" \");\n }\n\n int readInt() throws Exception\n {\n return Integer.valueOf(in.readLine());\n }\n\n long[] toLongArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n long[] ary = new long[n];\n for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);\n return ary;\n }\n\n int[] toIntArray() throws Exception\n {\n String[] sp = split();\n int n = sp.length;\n int[] ary = new int[n];\n for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);\n return ary;\n }\n\n String reverse(String str)\n {\n return new StringBuilder(str).reverse().toString();\n }\n\n\n long pow(long a, int pow)\n {\n long res = 1;\n while(pow > 0)\n {\n if(pow % 2 != 0) {\n res *= a;\n res %= mod;\n }\n a = a * a;\n a %= mod;\n pow /= 2;\n }\n\n return res;\n }\n\n public static void main(String[] args) throws Exception\n {\n int _k = Integer.valueOf(\"1\");\n if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));\n else in = new BufferedReader(new FileReader(file));\n if(test < 0) {String[] str = in.readLine().split(\" \");\n char[] gg = in.readLine().toCharArray();}\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n/***********************************************************************/\n // System.out.println((-100 + 0) / 2);\n\n // char[] c = new char[4];\n // c[1] = '.';\n // for(char i = '0'; i <= '9'; i++)\n // {\n // for(char j = '0'; j <= '9'; j++)\n // {\n // for(char k = '0'; k <= '9'; k++)\n // {\n // c[0] = i;\n // c[2] = j;\n // c[3] = k;\n // double d = Double.valueOf(String.valueOf(c));\n // int v = (int)(d * 100);\n // String s1 = String.valueOf(\"\" + c[0] + c[2] + c[3]),\n // s2 = String.valueOf(v);\n // System.out.printf(\"%s %s %b\\n\", s1, s2, s1.equals(s2));\n // }\n // }\n // }\n\n\n new Main().b();\n out.flush();\n }\n\n void e() throws Exception\n {\n int n = readInt();\n long[] a = new long[n], b = new long[n];\n for(int i = 0; i < n; i++)\n {\n long[] ary = toLongArray(); \n a[i] = ary[0];\n b[i] = ary[1];\n }\n \n long re = n;\n for(int i = 0; i < n; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] * a[j] + b[i] * b[j] != 0) re++;\n }\n }\n System.out.println(re);\n \n }\n\n void d() throws Exception\n {\n long n = Long.valueOf(in.readLine());\n int step = 0;\n int sqrt = (int) Math.sqrt(n);\n for(int i = 2; i < sqrt; i++)\n {\n if(n % i == 0)\n {\n // System.out.printf(\"...%d\\n\", i);\n int counter = 0;\n while(n % i == 0)\n {\n n /= i;\n counter++;\n }\n // System.out.printf(\"%d %d\\n\", i, counter);\n step += count(counter);\n }\n }\n if(n > 1) step++;\n \n System.out.println(step);\n }\n\n int count(int k)\n {\n int sum = 0, cur = 0;\n while(sum + cur <= k)\n {\n sum += cur;\n cur++;\n }\n return cur - 1;\n }\n\n\n void c() throws Exception\n {\n String[] str = split();\n double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);\n long first = (long) a;\n int mul = (int) (b * 100);\n System.out.printf(\"%d %d\\n\", first, mul);\n long sum = first * mul / 100;\n System.out.println(sum);\n }\n\n int gcd(int a, int b)\n {\n if(b == 0) return a;\n return gcd(b, a % b);\n }\n\n void b() throws Exception\n {\n int[] ary = toIntArray();\n int n = ary[0], k = ary[1];\n ary = toIntArray();\n Arrays.sort(ary);\n int sum = 0;\n for(int i = 0; i < k; i++)\n sum += ary[i];\n System.out.println(sum);\n }\n\n void a() throws Exception\n {\n String str = in.readLine();\n char c = str.charAt(0);\n if('a' <= c && c <= 'z') out.println('a');\n else out.println('A');\n }\n}",
"Main"
]
| import java.math.*;
import java.util.*;
import java.io.*;
public class Main {
static BufferedReader in;
static PrintWriter out = new PrintWriter(System.out);
static String file = "../in";
static int test = 10; // 0 for local testing, 1 for std input
static int inf = 1_000_000, mod = 1_000_000_007;
void swap(int[]ary, int i, int j)
{
int t = ary[i];
ary[i] = ary[j];
ary[j] = t;
}
String[] split() throws Exception
{
return in.readLine().split(" ");
}
int readInt() throws Exception
{
return Integer.valueOf(in.readLine());
}
long[] toLongArray() throws Exception
{
String[] sp = split();
int n = sp.length;
long[] ary = new long[n];
for(int i = 0; i < n; i++) ary[i] = Long.valueOf(sp[i]);
return ary;
}
int[] toIntArray() throws Exception
{
String[] sp = split();
int n = sp.length;
int[] ary = new int[n];
for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);
return ary;
}
String reverse(String str)
{
return new StringBuilder(str).reverse().toString();
}
long pow(long a, int pow)
{
long res = 1;
while(pow > 0)
{
if(pow % 2 != 0) {
res *= a;
res %= mod;
}
a = a * a;
a %= mod;
pow /= 2;
}
return res;
}
public static void main(String[] args) throws Exception
{
int _k = Integer.valueOf("1");
if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));
else in = new BufferedReader(new FileReader(file));
if(test < 0) {String[] str = in.readLine().split(" ");
char[] gg = in.readLine().toCharArray();}
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
// System.out.println((-100 + 0) / 2);
// char[] c = new char[4];
// c[1] = '.';
// for(char i = '0'; i <= '9'; i++)
// {
// for(char j = '0'; j <= '9'; j++)
// {
// for(char k = '0'; k <= '9'; k++)
// {
// c[0] = i;
// c[2] = j;
// c[3] = k;
// double d = Double.valueOf(String.valueOf(c));
// int v = (int)(d * 100);
// String s1 = String.valueOf("" + c[0] + c[2] + c[3]),
// s2 = String.valueOf(v);
// System.out.printf("%s %s %b\n", s1, s2, s1.equals(s2));
// }
// }
// }
new Main().b();
out.flush();
}
void e() throws Exception
{
int n = readInt();
long[] a = new long[n], b = new long[n];
for(int i = 0; i < n; i++)
{
long[] ary = toLongArray();
a[i] = ary[0];
b[i] = ary[1];
}
long re = n;
for(int i = 0; i < n; i++)
{
for(int j = i + 1; j < n; j++)
{
if(a[i] * a[j] + b[i] * b[j] != 0) re++;
}
}
System.out.println(re);
}
void d() throws Exception
{
long n = Long.valueOf(in.readLine());
int step = 0;
int sqrt = (int) Math.sqrt(n);
for(int i = 2; i < sqrt; i++)
{
if(n % i == 0)
{
// System.out.printf("...%d\n", i);
int counter = 0;
while(n % i == 0)
{
n /= i;
counter++;
}
// System.out.printf("%d %d\n", i, counter);
step += count(counter);
}
}
if(n > 1) step++;
System.out.println(step);
}
int count(int k)
{
int sum = 0, cur = 0;
while(sum + cur <= k)
{
sum += cur;
cur++;
}
return cur - 1;
}
void c() throws Exception
{
String[] str = split();
double a = Double.valueOf(str[0]), b = Double.valueOf(str[1]);
long first = (long) a;
int mul = (int) (b * 100);
System.out.printf("%d %d\n", first, mul);
long sum = first * mul / 100;
System.out.println(sum);
}
int gcd(int a, int b)
{
if(b == 0) return a;
return gcd(b, a % b);
}
void b() throws Exception
{
int[] ary = toIntArray();
int n = ary[0], k = ary[1];
ary = toIntArray();
Arrays.sort(ary);
int sum = 0;
for(int i = 0; i < k; i++)
sum += ary[i];
System.out.println(sum);
}
void a() throws Exception
{
String str = in.readLine();
char c = str.charAt(0);
if('a' <= c && c <= 'z') out.println('a');
else out.println('A');
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
20,
17,
12,
13,
30,
4,
18,
13,
13,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
2,
13,
13,
2,
13,
13,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
14,
2,
13,
17,
30,
29,
18,
13,
13,
29,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
29,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
309,
20
],
[
309,
21
],
[
21,
22
],
[
21,
23
],
[
309,
24
],
[
24,
25
],
[
24,
26
],
[
309,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
31,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
30,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
45,
55
],
[
55,
56
],
[
56,
57
],
[
45,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
67,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
67,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
30,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
30,
97
],
[
97,
98
],
[
28,
99
],
[
99,
100
],
[
309,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
103,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
101,
117
],
[
117,
118
],
[
101,
119
],
[
119,
120
],
[
309,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
123,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
131,
134
],
[
134,
135
],
[
134,
136
],
[
121,
137
],
[
137,
138
],
[
121,
139
],
[
139,
140
],
[
309,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
147,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
152,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
152,
163
],
[
163,
164
],
[
163,
165
],
[
152,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
172,
174
],
[
167,
175
],
[
175,
176
],
[
176,
177
],
[
167,
178
],
[
179,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
185,
186
],
[
152,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
152,
191
],
[
191,
192
],
[
191,
193
],
[
152,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
194,
199
],
[
199,
200
],
[
199,
201
],
[
194,
202
],
[
202,
203
],
[
203,
204
],
[
194,
205
],
[
206,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
209,
211
],
[
152,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
212,
217
],
[
141,
218
],
[
218,
219
],
[
309,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
220,
224
],
[
224,
225
],
[
220,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
220,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
236,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
235,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
245,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
234,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
220,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
264,
267
],
[
267,
268
],
[
220,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
273,
276
],
[
276,
277
],
[
220,
278
],
[
278,
279
],
[
278,
280
],
[
280,
281
],
[
281,
282
],
[
282,
283
],
[
283,
284
],
[
282,
285
],
[
285,
286
],
[
220,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
289,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
293,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
303,
304
],
[
304,
305
],
[
289,
306
],
[
306,
307
],
[
0,
308
],
[
308,
309
],
[
308,
310
]
]
| [
"import java.io.BufferedReader; \nimport java.io.IOException; \nimport java.io.InputStreamReader; \nimport java.util.Scanner; \nimport java.util.StringTokenizer; \nimport java.util.*;\n \npublic class Main\n{ \n //By shwetank_verma\n static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n } \n static int mod=1000000007;\n static boolean primes[]=new boolean[1000007];\n \n static boolean seive(int n){\n Arrays.fill(primes,true);\n primes[0]=primes[1]=false;\n for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }\n if(n<1000007){\n return primes[n];\n }\n return false;\n \n }\n static int gcd(int a,int b){\n if(b==0)\n return a;\n return gcd(b,a%b);\n }\n static long GCD(long a,long b){\n if(b==0)\n return a;\n return GCD(b,a%b);\n }\n \n \n public static void main(String[] args) \n { \n FastReader sc=new FastReader(); \n try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }\n } \n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{ \n //By shwetank_verma\n static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n } \n static int mod=1000000007;\n static boolean primes[]=new boolean[1000007];\n \n static boolean seive(int n){\n Arrays.fill(primes,true);\n primes[0]=primes[1]=false;\n for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }\n if(n<1000007){\n return primes[n];\n }\n return false;\n \n }\n static int gcd(int a,int b){\n if(b==0)\n return a;\n return gcd(b,a%b);\n }\n static long GCD(long a,long b){\n if(b==0)\n return a;\n return GCD(b,a%b);\n }\n \n \n public static void main(String[] args) \n { \n FastReader sc=new FastReader(); \n try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }\n } \n}",
"Main",
"static int mod=1000000007;",
"mod",
"1000000007",
"static boolean primes[]=new boolean[1000007];",
"primes",
"new boolean[1000007]",
"1000007",
"static boolean seive(int n){\n Arrays.fill(primes,true);\n primes[0]=primes[1]=false;\n for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }\n if(n<1000007){\n return primes[n];\n }\n return false;\n \n }",
"seive",
"{\n Arrays.fill(primes,true);\n primes[0]=primes[1]=false;\n for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }\n if(n<1000007){\n return primes[n];\n }\n return false;\n \n }",
"Arrays.fill(primes,true)",
"Arrays.fill",
"Arrays",
"primes",
"true",
"primes[0]=primes[1]=false",
"primes[0]",
"primes",
"0",
"primes[1]=false",
"primes[1]",
"primes",
"1",
"false",
"for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i*i<=n",
"i*i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }",
"{\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }",
"if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }",
"primes[i]==true",
"primes[i]",
"primes",
"i",
"true",
"{\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }",
"for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }",
"int p=i*i;",
"int p=i*i;",
"p",
"i*i",
"i",
"i",
"p<=n",
"p",
"n",
"p+=i",
"p+=i",
"p",
"i",
"{\n primes[p]=false;\n }",
"{\n primes[p]=false;\n }",
"primes[p]=false",
"primes[p]",
"primes",
"p",
"false",
"if(n<1000007){\n return primes[n];\n }",
"n<1000007",
"n",
"1000007",
"{\n return primes[n];\n }",
"return primes[n];",
"primes[n]",
"primes",
"n",
"return false;",
"false",
"int n",
"n",
"static int gcd(int a,int b){\n if(b==0)\n return a;\n return gcd(b,a%b);\n }",
"gcd",
"{\n if(b==0)\n return a;\n return gcd(b,a%b);\n }",
"if(b==0)\n return a;",
"b==0",
"b",
"0",
"return a;",
"a",
"return gcd(b,a%b);",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static long GCD(long a,long b){\n if(b==0)\n return a;\n return GCD(b,a%b);\n }",
"GCD",
"{\n if(b==0)\n return a;\n return GCD(b,a%b);\n }",
"if(b==0)\n return a;",
"b==0",
"b",
"0",
"return a;",
"a",
"return GCD(b,a%b);",
"GCD(b,a%b)",
"GCD",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public static void main(String[] args) \n { \n FastReader sc=new FastReader(); \n try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }\n }",
"main",
"{ \n FastReader sc=new FastReader(); \n try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }\n }",
"FastReader sc=new FastReader();",
"sc",
"new FastReader()",
"try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }",
"catch(Exception e){\n return;\n }",
"Exception e",
"{\n return;\n }",
"return;",
"{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i]=sc.nextInt();\n }",
"{\n a[i]=sc.nextInt();\n }",
"a[i]=sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int s=0;",
"s",
"0",
"for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \ts+=a[i];\n }",
"{\n \ts+=a[i];\n }",
"s+=a[i]",
"s",
"a[i]",
"a",
"i",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n }",
"FastReader",
"{ \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n }",
"br = new BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n InputStreamReader(System.in))",
"String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n }",
"try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n }",
"catch (IOException e) \n { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n st = new StringTokenizer(br.readLine()); \n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() \n { \n return Integer.parseInt(next()); \n }",
"nextInt",
"{ \n return Integer.parseInt(next()); \n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() \n { \n return Long.parseLong(next()); \n }",
"nextLong",
"{ \n return Long.parseLong(next()); \n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() \n { \n return Double.parseDouble(next()); \n }",
"nextDouble",
"{ \n return Double.parseDouble(next()); \n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n }",
"catch (IOException e) \n { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n str = br.readLine(); \n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{ \n //By shwetank_verma\n static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n } \n static int mod=1000000007;\n static boolean primes[]=new boolean[1000007];\n \n static boolean seive(int n){\n Arrays.fill(primes,true);\n primes[0]=primes[1]=false;\n for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }\n if(n<1000007){\n return primes[n];\n }\n return false;\n \n }\n static int gcd(int a,int b){\n if(b==0)\n return a;\n return gcd(b,a%b);\n }\n static long GCD(long a,long b){\n if(b==0)\n return a;\n return GCD(b,a%b);\n }\n \n \n public static void main(String[] args) \n { \n FastReader sc=new FastReader(); \n try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }\n } \n}",
"public class Main\n{ \n //By shwetank_verma\n static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n } \n static int mod=1000000007;\n static boolean primes[]=new boolean[1000007];\n \n static boolean seive(int n){\n Arrays.fill(primes,true);\n primes[0]=primes[1]=false;\n for(int i=2;i*i<=n;i++){\n if(primes[i]==true){\n for(int p=i*i;p<=n;p+=i){\n primes[p]=false;\n }\n }\n }\n if(n<1000007){\n return primes[n];\n }\n return false;\n \n }\n static int gcd(int a,int b){\n if(b==0)\n return a;\n return gcd(b,a%b);\n }\n static long GCD(long a,long b){\n if(b==0)\n return a;\n return GCD(b,a%b);\n }\n \n \n public static void main(String[] args) \n { \n FastReader sc=new FastReader(); \n try{\n \n \n int n=sc.nextInt();\n int k=sc.nextInt();\n \n int a[]=new int[n];\n for(int i=0;i<n;i++){\n a[i]=sc.nextInt();\n }\n Arrays.sort(a);\n int s=0;\n for(int i=0;i<k;i++)\n {\n \ts+=a[i];\n }\n System.out.println(s);\n \n \n \n }catch(Exception e){\n return;\n }\n } \n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class Main
{
//By shwetank_verma
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next()
{
while (st == null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
static int mod=1000000007;
static boolean primes[]=new boolean[1000007];
static boolean seive(int n){
Arrays.fill(primes,true);
primes[0]=primes[1]=false;
for(int i=2;i*i<=n;i++){
if(primes[i]==true){
for(int p=i*i;p<=n;p+=i){
primes[p]=false;
}
}
}
if(n<1000007){
return primes[n];
}
return false;
}
static int gcd(int a,int b){
if(b==0)
return a;
return gcd(b,a%b);
}
static long GCD(long a,long b){
if(b==0)
return a;
return GCD(b,a%b);
}
public static void main(String[] args)
{
FastReader sc=new FastReader();
try{
int n=sc.nextInt();
int k=sc.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++){
a[i]=sc.nextInt();
}
Arrays.sort(a);
int s=0;
for(int i=0;i<k;i++)
{
s+=a[i];
}
System.out.println(s);
}catch(Exception e){
return;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
88,
8
],
[
88,
9
],
[
9,
10
],
[
9,
11
],
[
88,
12
],
[
12,
13
],
[
88,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
16,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
16,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
16,
58
],
[
58,
59
],
[
58,
60
],
[
16,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
16,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
14,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.math.BigInteger;\nimport java.util.*;\npublic class Main {\n\tstatic Map<Long,ArrayList<String>> l=new TreeMap<Long,ArrayList<String>>();\n\tstatic long p[];\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint a[]=new int [n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\t\n\t\n}\n\n ",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic Map<Long,ArrayList<String>> l=new TreeMap<Long,ArrayList<String>>();\n\tstatic long p[];\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint a[]=new int [n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\t\n\t\n}",
"Main",
"static Map<Long,ArrayList<String>> l=new TreeMap<Long,ArrayList<String>>();",
"l",
"new TreeMap<Long,ArrayList<String>>()",
"static long p[];",
"p",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint a[]=new int [n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint a[]=new int [n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[]=new int [n];",
"a",
"new int [n]",
"n",
"for(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i]=sc.nextInt();\n\t\t}",
"{\n\t\t\ta[i]=sc.nextInt();\n\t\t}",
"a[i]=sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tsum+=a[i];\n\t\t}",
"{\n\t\t\tsum+=a[i];\n\t\t}",
"sum+=a[i]",
"sum",
"a[i]",
"a",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\tstatic Map<Long,ArrayList<String>> l=new TreeMap<Long,ArrayList<String>>();\n\tstatic long p[];\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint a[]=new int [n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\t\n\t\n}",
"public class Main {\n\tstatic Map<Long,ArrayList<String>> l=new TreeMap<Long,ArrayList<String>>();\n\tstatic long p[];\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint a[]=new int [n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\t\n\t\n}",
"Main"
]
| import java.math.BigInteger;
import java.util.*;
public class Main {
static Map<Long,ArrayList<String>> l=new TreeMap<Long,ArrayList<String>>();
static long p[];
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=sc.nextInt();
int a[]=new int [n];
for(int i=0;i<n;i++) {
a[i]=sc.nextInt();
}
Arrays.sort(a);
int sum=0;
for(int i=0;i<k;i++) {
sum+=a[i];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
14,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
14,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
14,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
14,
82
],
[
82,
83
],
[
83,
84
],
[
12,
85
],
[
85,
86
],
[
10,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
87,
91
],
[
91,
92
],
[
91,
93
],
[
87,
95
],
[
95,
96
],
[
87,
97
],
[
97,
98
],
[
87,
99
],
[
99,
100
],
[
87,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
101,
109
],
[
109,
110
],
[
87,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
114,
119
],
[
119,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
129,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
125,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
146,
147
],
[
147,
148
],
[
113,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
87,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
156,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
156,
170
],
[
170,
171
],
[
170,
172
],
[
156,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
177,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
156,
186
],
[
186,
187
],
[
186,
188
],
[
156,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
189,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
200,
201
],
[
200,
202
],
[
195,
203
],
[
203,
204
],
[
194,
205
],
[
205,
206
],
[
205,
207
],
[
194,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
210,
212
],
[
194,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
156,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
87,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
223,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
223,
237
],
[
237,
238
],
[
237,
239
],
[
223,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
244,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
223,
253
],
[
253,
254
],
[
253,
255
],
[
223,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
256,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
263,
267
],
[
267,
268
],
[
267,
269
],
[
262,
270
],
[
270,
271
],
[
261,
272
],
[
272,
273
],
[
272,
274
],
[
261,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
277,
279
],
[
261,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
223,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
87,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
290,
295
],
[
295,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
295,
300
],
[
300,
301
],
[
300,
302
],
[
295,
303
],
[
303,
304
],
[
304,
305
],
[
295,
306
],
[
307,
307
],
[
307,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
308,
312
],
[
312,
313
],
[
290,
314
],
[
314,
315
],
[
288,
316
],
[
316,
317
],
[
87,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
320,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
329,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
320,
334
],
[
334,
335
],
[
334,
336
],
[
320,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
337,
342
],
[
342,
343
],
[
343,
344
],
[
344,
345
],
[
343,
346
],
[
342,
347
],
[
347,
348
],
[
347,
349
],
[
349,
350
],
[
320,
351
],
[
351,
352
],
[
352,
353
],
[
353,
354
],
[
87,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
357,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
362,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
357,
370
],
[
370,
371
],
[
370,
372
],
[
357,
373
],
[
373,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
373,
378
],
[
378,
379
],
[
379,
380
],
[
380,
381
],
[
379,
382
],
[
378,
383
],
[
383,
384
],
[
383,
385
],
[
385,
386
],
[
357,
387
],
[
387,
388
],
[
388,
389
],
[
389,
390
],
[
87,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
394,
395
],
[
395,
396
],
[
395,
397
],
[
394,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
399,
402
],
[
393,
403
],
[
403,
404
],
[
407,
405
],
[
417,
406
],
[
414,
407
],
[
407,
408
],
[
408,
409
],
[
408,
410
],
[
407,
411
],
[
411,
412
],
[
411,
413
],
[
414,
414
],
[
414,
415
],
[
414,
416
],
[
417,
417
],
[
417,
418
],
[
417,
419
],
[
407,
420
],
[
420,
421
],
[
420,
422
],
[
422,
423
],
[
391,
424
],
[
424,
425
],
[
87,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
431,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
431,
435
],
[
435,
436
],
[
435,
437
],
[
431,
438
],
[
438,
439
],
[
438,
440
],
[
440,
441
],
[
426,
442
],
[
442,
443
],
[
87,
444
],
[
444,
445
],
[
444,
446
],
[
446,
447
],
[
446,
448
],
[
448,
449
]
]
| [
"/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\nclass Main\n{\n\tpublic static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n PrintWriter w = new PrintWriter(System.out);\n \n int n = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = in.nextInt();\n Arrays.sort(a);\n for (int i = 0; i < k; i++)\n sum += a[i];\n w.println(sum);\n w.close();\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n\tpublic static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n PrintWriter w = new PrintWriter(System.out);\n \n int n = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = in.nextInt();\n Arrays.sort(a);\n for (int i = 0; i < k; i++)\n sum += a[i];\n w.println(sum);\n w.close();\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n PrintWriter w = new PrintWriter(System.out);\n \n int n = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = in.nextInt();\n Arrays.sort(a);\n for (int i = 0; i < k; i++)\n sum += a[i];\n w.println(sum);\n w.close();\n }",
"main",
"{\n InputReader in = new InputReader(System.in);\n PrintWriter w = new PrintWriter(System.out);\n \n int n = in.nextInt();\n int k = in.nextInt();\n int sum = 0;\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = in.nextInt();\n Arrays.sort(a);\n for (int i = 0; i < k; i++)\n sum += a[i];\n w.println(sum);\n w.close();\n }",
"InputReader in = new InputReader(System.in);",
"in",
"new InputReader(System.in)",
"PrintWriter w = new PrintWriter(System.out);",
"w",
"new PrintWriter(System.out)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int sum = 0;",
"sum",
"0",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = in.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = in.nextInt();",
"a[i] = in.nextInt()",
"a[i]",
"a",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"for (int i = 0; i < k; i++)\n sum += a[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"sum += a[i];",
"sum += a[i]",
"sum",
"a[i]",
"a",
"i",
"w.println(sum)",
"w.println",
"w",
"sum",
"w.close()",
"w.close",
"w",
"String[] args",
"args",
"static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }",
"InputReader",
"private final InputStream stream;",
"stream",
"private final byte[] buf = new byte[8192];",
"buf",
"new byte[8192]",
"8192",
"private int curChar",
"curChar",
"snumChars;",
"snumChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"snext",
"{\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (snumChars == -1)\n throw new InputMismatchException();",
"snumChars == -1",
"snumChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar >= snumChars",
"curChar",
"snumChars",
"{\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n snumChars = stream.read(buf);\n }",
"snumChars = stream.read(buf)",
"snumChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (snumChars <= 0)\n return -1;",
"snumChars <= 0",
"snumChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = snext();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = snext();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = snext()",
"c",
"snext()",
"snext",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n }",
"if (c < '0' || c > '9')\n throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = snext()",
"c",
"snext()",
"snext",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextLong",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = snext();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = snext();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = snext()",
"c",
"snext()",
"snext",
"long res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n }",
"if (c < '0' || c > '9')\n throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = snext()",
"c",
"snext()",
"snext",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"nextIntArray",
"{\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"int a[] = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextInt();\n }",
"{\n a[i] = nextInt();\n }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"readString",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = snext();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c))\n c = snext();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n res.appendCodePoint(c);\n c = snext();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null)\n return filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"isEndOfLine",
"{\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"return c == '\\n' || c == '\\r' || c == -1;",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch"
]
| /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
int n = in.nextInt();
int k = in.nextInt();
int sum = 0;
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = in.nextInt();
Arrays.sort(a);
for (int i = 0; i < k; i++)
sum += a[i];
w.println(sum);
w.close();
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int snext() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public String readString() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = snext();
while (isSpaceChar(c))
c = snext();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
78,
5
],
[
78,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n = sc.nextInt(), choo = sc.nextInt();\n\t\tint[] x=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();\n\t\tlong sum = 0;\n\t\tArrays.sort(x);\n\t\tfor(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];\n\t\tSystem.out.println(sum);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n = sc.nextInt(), choo = sc.nextInt();\n\t\tint[] x=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();\n\t\tlong sum = 0;\n\t\tArrays.sort(x);\n\t\tfor(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n = sc.nextInt(), choo = sc.nextInt();\n\t\tint[] x=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();\n\t\tlong sum = 0;\n\t\tArrays.sort(x);\n\t\tfor(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n = sc.nextInt(), choo = sc.nextInt();\n\t\tint[] x=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();\n\t\tlong sum = 0;\n\t\tArrays.sort(x);\n\t\tfor(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];\n\t\tSystem.out.println(sum);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"choo = sc.nextInt();",
"choo",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] x=new int[n];",
"x",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"x[i] = sc.nextInt();",
"x[i] = sc.nextInt()",
"x[i]",
"x",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long sum = 0;",
"sum",
"0",
"Arrays.sort(x)",
"Arrays.sort",
"Arrays",
"x",
"for(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<choo",
"i",
"choo",
"i++",
"i++",
"i",
"sum+=x[i];",
"sum+=x[i]",
"sum",
"x[i]",
"x",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n = sc.nextInt(), choo = sc.nextInt();\n\t\tint[] x=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();\n\t\tlong sum = 0;\n\t\tArrays.sort(x);\n\t\tfor(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];\n\t\tSystem.out.println(sum);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n = sc.nextInt(), choo = sc.nextInt();\n\t\tint[] x=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tx[i] = sc.nextInt();\n\t\tlong sum = 0;\n\t\tArrays.sort(x);\n\t\tfor(int i=0;i<choo;i++)\n\t\t\tsum+=x[i];\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n = sc.nextInt(), choo = sc.nextInt();
int[] x=new int[n];
for(int i=0;i<n;i++)
x[i] = sc.nextInt();
long sum = 0;
Arrays.sort(x);
for(int i=0;i<choo;i++)
sum+=x[i];
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
4,
18,
13,
17,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
111,
8
],
[
111,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
25,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
36,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
11,
47
],
[
47,
48
],
[
47,
49
],
[
11,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
71,
76
],
[
11,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
11,
81
],
[
81,
82
],
[
81,
83
],
[
11,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
11,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
9,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n String input = stdIn.nextLine();\n int n = Integer.parseInt(input.split(\" \")[0]);\n int k = Integer.parseInt(input.split(\" \")[1]);\n\n String P = stdIn.nextLine();\n int[] p = new int[n];\n for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }\n Arrays.sort(p);\n int ans = 0;\n for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n String input = stdIn.nextLine();\n int n = Integer.parseInt(input.split(\" \")[0]);\n int k = Integer.parseInt(input.split(\" \")[1]);\n\n String P = stdIn.nextLine();\n int[] p = new int[n];\n for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }\n Arrays.sort(p);\n int ans = 0;\n for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n String input = stdIn.nextLine();\n int n = Integer.parseInt(input.split(\" \")[0]);\n int k = Integer.parseInt(input.split(\" \")[1]);\n\n String P = stdIn.nextLine();\n int[] p = new int[n];\n for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }\n Arrays.sort(p);\n int ans = 0;\n for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n String input = stdIn.nextLine();\n int n = Integer.parseInt(input.split(\" \")[0]);\n int k = Integer.parseInt(input.split(\" \")[1]);\n\n String P = stdIn.nextLine();\n int[] p = new int[n];\n for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }\n Arrays.sort(p);\n int ans = 0;\n for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }\n System.out.println(ans);\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"String input = stdIn.nextLine();",
"input",
"stdIn.nextLine()",
"stdIn.nextLine",
"stdIn",
"int n = Integer.parseInt(input.split(\" \")[0]);",
"n",
"Integer.parseInt(input.split(\" \")[0])",
"Integer.parseInt",
"Integer",
"input.split(\" \")[0]",
"input.split(\" \")",
"input.split",
"input",
"\" \"",
"0",
"int k = Integer.parseInt(input.split(\" \")[1]);",
"k",
"Integer.parseInt(input.split(\" \")[1])",
"Integer.parseInt",
"Integer",
"input.split(\" \")[1]",
"input.split(\" \")",
"input.split",
"input",
"\" \"",
"1",
"String P = stdIn.nextLine();",
"P",
"stdIn.nextLine()",
"stdIn.nextLine",
"stdIn",
"int[] p = new int[n];",
"p",
"new int[n]",
"n",
"for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }",
"{\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }",
"p[i] = Integer.parseInt(P.split(\" \")[i])",
"p[i]",
"p",
"i",
"Integer.parseInt(P.split(\" \")[i])",
"Integer.parseInt",
"Integer",
"P.split(\" \")[i]",
"P.split(\" \")",
"P.split",
"P",
"\" \"",
"i",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int ans = 0;",
"ans",
"0",
"for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans += p[i];\n }",
"{\n ans += p[i];\n }",
"ans += p[i]",
"ans",
"p[i]",
"p",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n String input = stdIn.nextLine();\n int n = Integer.parseInt(input.split(\" \")[0]);\n int k = Integer.parseInt(input.split(\" \")[1]);\n\n String P = stdIn.nextLine();\n int[] p = new int[n];\n for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }\n Arrays.sort(p);\n int ans = 0;\n for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n String input = stdIn.nextLine();\n int n = Integer.parseInt(input.split(\" \")[0]);\n int k = Integer.parseInt(input.split(\" \")[1]);\n\n String P = stdIn.nextLine();\n int[] p = new int[n];\n for(int i = 0 ; i < n ; i++){\n p[i] = Integer.parseInt(P.split(\" \")[i]);\n }\n Arrays.sort(p);\n int ans = 0;\n for(int i = 0 ; i < k ; i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
String input = stdIn.nextLine();
int n = Integer.parseInt(input.split(" ")[0]);
int k = Integer.parseInt(input.split(" ")[1]);
String P = stdIn.nextLine();
int[] p = new int[n];
for(int i = 0 ; i < n ; i++){
p[i] = Integer.parseInt(P.split(" ")[i]);
}
Arrays.sort(p);
int ans = 0;
for(int i = 0 ; i < k ; i++){
ans += p[i];
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }\n\n Arrays.sort(prices);\n\n int price = 0;\n for (int i = 0; i < k; i++) {\n price += prices[i];\n }\n\n System.out.println(price);\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }\n\n Arrays.sort(prices);\n\n int price = 0;\n for (int i = 0; i < k; i++) {\n price += prices[i];\n }\n\n System.out.println(price);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }\n\n Arrays.sort(prices);\n\n int price = 0;\n for (int i = 0; i < k; i++) {\n price += prices[i];\n }\n\n System.out.println(price);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }\n\n Arrays.sort(prices);\n\n int price = 0;\n for (int i = 0; i < k; i++) {\n price += prices[i];\n }\n\n System.out.println(price);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int k = scanner.nextInt();",
"k",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] prices = new int[n];",
"prices",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n prices[i] = scanner.nextInt();\n }",
"{\n prices[i] = scanner.nextInt();\n }",
"prices[i] = scanner.nextInt()",
"prices[i]",
"prices",
"i",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Arrays.sort(prices)",
"Arrays.sort",
"Arrays",
"prices",
"int price = 0;",
"price",
"0",
"for (int i = 0; i < k; i++) {\n price += prices[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n price += prices[i];\n }",
"{\n price += prices[i];\n }",
"price += prices[i]",
"price",
"prices[i]",
"prices",
"i",
"System.out.println(price)",
"System.out.println",
"System.out",
"System",
"System.out",
"price",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }\n\n Arrays.sort(prices);\n\n int price = 0;\n for (int i = 0; i < k; i++) {\n price += prices[i];\n }\n\n System.out.println(price);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = scanner.nextInt();\n }\n\n Arrays.sort(prices);\n\n int price = 0;\n for (int i = 0; i < k; i++) {\n price += prices[i];\n }\n\n System.out.println(price);\n }\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int k = scanner.nextInt();
int[] prices = new int[n];
for (int i = 0; i < n; i++) {
prices[i] = scanner.nextInt();
}
Arrays.sort(prices);
int price = 0;
for (int i = 0; i < k; i++) {
price += prices[i];
}
System.out.println(price);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.*;\npublic class Main {\n public static void main(String[] args){\n\n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n int K = sc.nextInt();\n int p[] = new int[N];\n\n for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int total = 0;\n for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }\n System.out.println(total);\n\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n\n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n int K = sc.nextInt();\n int p[] = new int[N];\n\n for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int total = 0;\n for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }\n System.out.println(total);\n\n }\n}",
"Main",
"public static void main(String[] args){\n\n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n int K = sc.nextInt();\n int p[] = new int[N];\n\n for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int total = 0;\n for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }\n System.out.println(total);\n\n }",
"main",
"{\n\n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n int K = sc.nextInt();\n int p[] = new int[N];\n\n for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int total = 0;\n for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }\n System.out.println(total);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int p[] = new int[N];",
"p",
"new int[N]",
"N",
"for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n p[i] = sc.nextInt();\n }",
"{\n p[i] = sc.nextInt();\n }",
"p[i] = sc.nextInt()",
"p[i]",
"p",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int total = 0;",
"total",
"0",
"for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<K",
"j",
"K",
"j++",
"j++",
"j",
"{\n \ttotal = total + p[j];\n }",
"{\n \ttotal = total + p[j];\n }",
"total = total + p[j]",
"total",
"total + p[j]",
"total",
"p[j]",
"p",
"j",
"System.out.println(total)",
"System.out.println",
"System.out",
"System",
"System.out",
"total",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n\n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n int K = sc.nextInt();\n int p[] = new int[N];\n\n for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int total = 0;\n for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }\n System.out.println(total);\n\n }\n}",
"public class Main {\n public static void main(String[] args){\n\n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n int K = sc.nextInt();\n int p[] = new int[N];\n\n for(int i=0;i<N;i++){\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int total = 0;\n for(int j=0;j<K;j++){\n \ttotal = total + p[j];\n }\n System.out.println(total);\n\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int p[] = new int[N];
for(int i=0;i<N;i++){
p[i] = sc.nextInt();
}
Arrays.sort(p);
int total = 0;
for(int j=0;j<K;j++){
total = total + p[j];
}
System.out.println(total);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
82,
8
],
[
82,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
11,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
9,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int[] pn = new int[N];\n int result = 0;\n \n for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }\n Arrays.sort(pn);\n for(int i=0; i<K; i++)\n result += pn[i];\n System.out.println(result);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int[] pn = new int[N];\n int result = 0;\n \n for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }\n Arrays.sort(pn);\n for(int i=0; i<K; i++)\n result += pn[i];\n System.out.println(result);\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int[] pn = new int[N];\n int result = 0;\n \n for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }\n Arrays.sort(pn);\n for(int i=0; i<K; i++)\n result += pn[i];\n System.out.println(result);\n }",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int[] pn = new int[N];\n int result = 0;\n \n for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }\n Arrays.sort(pn);\n for(int i=0; i<K; i++)\n result += pn[i];\n System.out.println(result);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] pn = new int[N];",
"pn",
"new int[N]",
"N",
"int result = 0;",
"result",
"0",
"for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n pn[i] = scan.nextInt();\n }",
"{\n pn[i] = scan.nextInt();\n }",
"pn[i] = scan.nextInt()",
"pn[i]",
"pn",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"Arrays.sort(pn)",
"Arrays.sort",
"Arrays",
"pn",
"for(int i=0; i<K; i++)\n result += pn[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"result += pn[i];",
"result += pn[i]",
"result",
"pn[i]",
"pn",
"i",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int[] pn = new int[N];\n int result = 0;\n \n for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }\n Arrays.sort(pn);\n for(int i=0; i<K; i++)\n result += pn[i];\n System.out.println(result);\n }\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int[] pn = new int[N];\n int result = 0;\n \n for(int i=0; i<N; i++){\n pn[i] = scan.nextInt();\n }\n Arrays.sort(pn);\n for(int i=0; i<K; i++)\n result += pn[i];\n System.out.println(result);\n }\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
int[] pn = new int[N];
int result = 0;
for(int i=0; i<N; i++){
pn[i] = scan.nextInt();
}
Arrays.sort(pn);
for(int i=0; i<K; i++)
result += pn[i];
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
4,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
6,
13,
41,
13,
12,
13,
30,
4,
13,
18,
13,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
18,
36,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
37,
20,
29,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
40,
17,
30,
41,
13,
17,
41,
13,
4,
18,
13,
42,
2,
2,
2,
2,
13,
17,
2,
17,
13,
2,
13,
17,
2,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
2,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
17,
13,
29,
2,
13,
13,
0,
13,
17,
0,
13,
2,
13,
17,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
18,
13,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
42,
2,
2,
2,
2,
13,
17,
2,
17,
13,
2,
13,
17,
2,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
2,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
17,
13,
3,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
13,
17,
29,
2,
13,
13,
41,
13,
17,
0,
13,
4,
18,
13,
42,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
17,
0,
13,
4,
18,
13,
29,
2,
2,
13,
13,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
17,
30,
41,
13,
4,
18,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
18,
13,
29,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
18,
13,
42,
2,
2,
13,
40,
17,
40,
4,
18,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
29,
4,
18,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
2,
13,
40,
17,
2,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
760,
11
],
[
760,
12
],
[
12,
13
],
[
760,
14
],
[
14,
15
],
[
760,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
760,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
23,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
23,
44
],
[
44,
45
],
[
44,
46
],
[
23,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
23,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
760,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
69,
75
],
[
75,
76
],
[
760,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
79,
86
],
[
86,
87
],
[
79,
88
],
[
88,
89
],
[
89,
90
],
[
79,
91
],
[
91,
92
],
[
92,
93
],
[
79,
94
],
[
94,
95
],
[
95,
96
],
[
760,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
97,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
109,
117
],
[
117,
118
],
[
97,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
122,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
97,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
137,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
143,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
142,
154
],
[
154,
155
],
[
137,
156
],
[
156,
157
],
[
97,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
164,
168
],
[
168,
169
],
[
169,
170
],
[
161,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
171,
180
],
[
180,
181
],
[
182,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
187,
189
],
[
182,
190
],
[
190,
191
],
[
190,
192
],
[
182,
193
],
[
193,
194
],
[
193,
195
],
[
180,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
171,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
202,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
206,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
202,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
171,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
228,
230
],
[
171,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
233,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
244,
246
],
[
239,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
233,
251
],
[
251,
252
],
[
251,
253
],
[
233,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
256,
258
],
[
97,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
265,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
262,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
273,
282
],
[
282,
283
],
[
284,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
285,
289
],
[
289,
290
],
[
289,
291
],
[
284,
292
],
[
292,
293
],
[
292,
294
],
[
284,
295
],
[
295,
296
],
[
295,
297
],
[
282,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
301,
302
],
[
302,
303
],
[
273,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
304,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
308,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
316,
317
],
[
304,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
318,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
326,
327
],
[
273,
328
],
[
328,
329
],
[
328,
330
],
[
330,
331
],
[
330,
332
],
[
273,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
339,
340
],
[
335,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
346,
347
],
[
346,
348
],
[
341,
349
],
[
335,
350
],
[
350,
351
],
[
350,
352
],
[
335,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
355,
357
],
[
273,
358
],
[
358,
359
],
[
359,
360
],
[
359,
361
],
[
358,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
273,
366
],
[
366,
367
],
[
366,
368
],
[
273,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
273,
374
],
[
374,
375
],
[
375,
376
],
[
376,
377
],
[
376,
378
],
[
375,
379
],
[
379,
380
],
[
379,
381
],
[
374,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
382,
386
],
[
386,
387
],
[
386,
388
],
[
388,
389
],
[
388,
390
],
[
382,
391
],
[
391,
392
],
[
391,
393
],
[
382,
394
],
[
394,
395
],
[
394,
396
],
[
396,
397
],
[
397,
398
],
[
273,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
401,
403
],
[
400,
404
],
[
97,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
411,
415
],
[
415,
416
],
[
408,
417
],
[
417,
418
],
[
418,
419
],
[
418,
420
],
[
420,
421
],
[
421,
422
],
[
417,
423
],
[
423,
424
],
[
424,
425
],
[
425,
426
],
[
424,
427
],
[
423,
428
],
[
428,
429
],
[
429,
430
],
[
429,
431
],
[
431,
432
],
[
432,
433
],
[
417,
434
],
[
434,
435
],
[
97,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
442,
446
],
[
446,
447
],
[
439,
448
],
[
448,
449
],
[
449,
450
],
[
449,
451
],
[
448,
452
],
[
452,
453
],
[
452,
454
],
[
454,
455
],
[
455,
456
],
[
448,
457
],
[
457,
458
],
[
458,
459
],
[
459,
460
],
[
458,
461
],
[
457,
462
],
[
462,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
466,
467
],
[
448,
468
],
[
468,
469
],
[
469,
470
],
[
470,
471
],
[
470,
472
],
[
472,
473
],
[
469,
474
],
[
474,
475
],
[
475,
476
],
[
476,
477
],
[
475,
478
],
[
468,
479
],
[
479,
480
],
[
480,
481
],
[
481,
482
],
[
480,
483
],
[
479,
484
],
[
484,
485
],
[
484,
486
],
[
486,
487
],
[
487,
488
],
[
448,
489
],
[
489,
490
],
[
490,
491
],
[
491,
492
],
[
97,
493
],
[
493,
494
],
[
493,
495
],
[
495,
496
],
[
496,
497
],
[
497,
498
],
[
497,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
499,
503
],
[
503,
504
],
[
496,
505
],
[
505,
506
],
[
506,
507
],
[
506,
508
],
[
505,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
512,
513
],
[
505,
514
],
[
514,
515
],
[
515,
516
],
[
516,
517
],
[
516,
518
],
[
518,
519
],
[
515,
520
],
[
520,
521
],
[
520,
522
],
[
514,
523
],
[
523,
524
],
[
524,
525
],
[
525,
526
],
[
524,
527
],
[
523,
528
],
[
528,
529
],
[
528,
530
],
[
530,
531
],
[
531,
532
],
[
505,
533
],
[
533,
534
],
[
534,
535
],
[
535,
536
],
[
97,
537
],
[
537,
538
],
[
537,
539
],
[
539,
540
],
[
540,
541
],
[
540,
542
],
[
539,
544
],
[
544,
545
],
[
545,
546
],
[
546,
547
],
[
546,
548
],
[
544,
549
],
[
549,
550
],
[
549,
551
],
[
544,
552
],
[
552,
553
],
[
553,
554
],
[
544,
555
],
[
556,
556
],
[
556,
557
],
[
557,
558
],
[
558,
559
],
[
558,
560
],
[
557,
561
],
[
561,
562
],
[
539,
563
],
[
563,
564
],
[
537,
565
],
[
565,
566
],
[
97,
567
],
[
567,
568
],
[
567,
569
],
[
569,
570
],
[
570,
571
],
[
570,
572
],
[
569,
574
],
[
574,
575
],
[
575,
576
],
[
576,
577
],
[
576,
578
],
[
574,
579
],
[
579,
580
],
[
579,
581
],
[
574,
582
],
[
582,
583
],
[
583,
584
],
[
574,
585
],
[
586,
586
],
[
586,
587
],
[
587,
588
],
[
588,
589
],
[
588,
590
],
[
587,
591
],
[
591,
592
],
[
592,
593
],
[
591,
594
],
[
569,
595
],
[
595,
596
],
[
567,
597
],
[
597,
598
],
[
97,
599
],
[
599,
600
],
[
599,
601
],
[
601,
602
],
[
602,
603
],
[
602,
604
],
[
605,
606
],
[
605,
607
],
[
601,
608
],
[
608,
609
],
[
609,
610
],
[
610,
611
],
[
610,
612
],
[
608,
613
],
[
613,
614
],
[
613,
615
],
[
608,
616
],
[
616,
617
],
[
617,
618
],
[
608,
619
],
[
620,
620
],
[
620,
621
],
[
621,
622
],
[
622,
623
],
[
622,
624
],
[
624,
625
],
[
624,
626
],
[
621,
627
],
[
627,
628
],
[
601,
629
],
[
629,
630
],
[
599,
631
],
[
631,
632
],
[
97,
633
],
[
633,
634
],
[
633,
635
],
[
635,
636
],
[
636,
637
],
[
636,
638
],
[
635,
640
],
[
640,
641
],
[
641,
642
],
[
642,
643
],
[
642,
644
],
[
640,
645
],
[
645,
646
],
[
645,
647
],
[
640,
648
],
[
648,
649
],
[
649,
650
],
[
640,
651
],
[
652,
652
],
[
652,
653
],
[
653,
654
],
[
654,
655
],
[
654,
656
],
[
653,
657
],
[
657,
658
],
[
635,
659
],
[
659,
660
],
[
633,
661
],
[
661,
662
],
[
97,
663
],
[
663,
664
],
[
663,
665
],
[
665,
666
],
[
666,
667
],
[
666,
668
],
[
665,
670
],
[
670,
671
],
[
671,
672
],
[
672,
673
],
[
672,
674
],
[
670,
675
],
[
675,
676
],
[
675,
677
],
[
670,
678
],
[
678,
679
],
[
679,
680
],
[
670,
681
],
[
682,
682
],
[
682,
683
],
[
683,
684
],
[
684,
685
],
[
684,
686
],
[
683,
687
],
[
687,
688
],
[
688,
689
],
[
687,
690
],
[
665,
691
],
[
691,
692
],
[
663,
693
],
[
693,
694
],
[
97,
695
],
[
695,
696
],
[
695,
697
],
[
697,
698
],
[
698,
699
],
[
698,
700
],
[
701,
702
],
[
701,
703
],
[
697,
704
],
[
704,
705
],
[
705,
706
],
[
706,
707
],
[
706,
708
],
[
704,
709
],
[
709,
710
],
[
709,
711
],
[
704,
712
],
[
712,
713
],
[
713,
714
],
[
704,
715
],
[
716,
716
],
[
716,
717
],
[
717,
718
],
[
718,
719
],
[
718,
720
],
[
720,
721
],
[
720,
722
],
[
717,
723
],
[
723,
724
],
[
697,
725
],
[
725,
726
],
[
695,
727
],
[
727,
728
],
[
97,
729
],
[
729,
730
],
[
729,
731
],
[
731,
732
],
[
732,
733
],
[
732,
734
],
[
731,
736
],
[
736,
737
],
[
737,
738
],
[
738,
739
],
[
738,
740
],
[
736,
741
],
[
741,
742
],
[
741,
743
],
[
736,
744
],
[
744,
745
],
[
745,
746
],
[
736,
747
],
[
748,
748
],
[
748,
749
],
[
749,
750
],
[
750,
751
],
[
750,
752
],
[
749,
753
],
[
753,
754
],
[
731,
755
],
[
755,
756
],
[
729,
757
],
[
757,
758
],
[
0,
759
],
[
759,
760
],
[
759,
761
]
]
| [
"import java.io.*;\nimport java.math.BigDecimal;\nimport java.util.*;\n\n@SuppressWarnings(\"unused\")\npublic class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n int N = in.nextInt(), K = in.nextInt();\n int[] p = in.nextIntArray(N);\n Arrays.sort(p);\n int sum = 0;\n for(int i = 0; i < K; i++){\n sum += p[i];\n }\n out.println(sum);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n int N = in.nextInt(), K = in.nextInt();\n int[] p = in.nextIntArray(N);\n Arrays.sort(p);\n int sum = 0;\n for(int i = 0; i < K; i++){\n sum += p[i];\n }\n out.println(sum);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"Main",
"FastScanner in;",
"in",
"PrintWriter out;",
"out",
"final static int MOD = (int)1e9+7;",
"MOD",
"(int)1e9+7",
"(int)1e9",
"7",
"void solve(){\n int N = in.nextInt(), K = in.nextInt();\n int[] p = in.nextIntArray(N);\n Arrays.sort(p);\n int sum = 0;\n for(int i = 0; i < K; i++){\n sum += p[i];\n }\n out.println(sum);\n }",
"solve",
"{\n int N = in.nextInt(), K = in.nextInt();\n int[] p = in.nextIntArray(N);\n Arrays.sort(p);\n int sum = 0;\n for(int i = 0; i < K; i++){\n sum += p[i];\n }\n out.println(sum);\n }",
"int N = in.nextInt()",
"N",
"in.nextInt()",
"in.nextInt",
"in",
"K = in.nextInt();",
"K",
"in.nextInt()",
"in.nextInt",
"in",
"int[] p = in.nextIntArray(N);",
"p",
"in.nextIntArray(N)",
"in.nextIntArray",
"in",
"N",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int sum = 0;",
"sum",
"0",
"for(int i = 0; i < K; i++){\n sum += p[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n sum += p[i];\n }",
"{\n sum += p[i];\n }",
"sum += p[i]",
"sum",
"p[i]",
"p",
"i",
"out.println(sum)",
"out.println",
"out",
"sum",
"public static void main(String[] args) {\n new Main().m();\n }",
"main",
"{\n new Main().m();\n }",
"new Main().m()",
"new Main().m",
"new Main()",
"String[] args",
"args",
"private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }",
"m",
"{\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }",
"in = new FastScanner(System.in)",
"in",
"new FastScanner(System.in)",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"in.close()",
"in.close",
"in",
"out.close()",
"out.close",
"out",
"static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }",
"FastScanner",
"private Reader input;",
"input",
"public FastScanner() {this(System.in);}",
"FastScanner",
"{this(System.in);}",
"this(System.in)",
"this",
"System.in",
"System",
"System.in",
"public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}",
"FastScanner",
"{this.input = new BufferedReader(new InputStreamReader(stream));}",
"this.input = new BufferedReader(new InputStreamReader(stream))",
"this.input",
"this",
"this.input",
"new BufferedReader(new InputStreamReader(stream))",
"InputStream stream",
"stream",
"public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"close",
"{\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n this.input.close();\n }",
"this.input.close()",
"this.input.close",
"this.input",
"this",
"this.input",
"public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }",
"nextInt",
"{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }",
"nextLong",
"{\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }",
"try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }",
"catch (IOException e) {\n e.printStackTrace();\n return -1;\n }",
"IOException e",
"{\n e.printStackTrace();\n return -1;\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return -1;",
"-1",
"1",
"{\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n }",
"int sign = 1;",
"sign",
"1",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b)",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"b != '-'",
"b",
"'-'",
"b != '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }",
"b == '-'",
"b",
"'-'",
"{\n sign = -1;\n b = input.read();\n }",
"sign = -1",
"sign",
"-1",
"1",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '+') {\n b = input.read();\n }",
"b == '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"long ret = b - '0';",
"ret",
"b - '0'",
"b",
"'0'",
"while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }",
"true",
"{\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b < '0' || '9' < b) return ret * sign;",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"return ret * sign;",
"ret * sign",
"ret",
"sign",
"ret *= 10",
"ret",
"10",
"ret += b - '0'",
"ret",
"b - '0'",
"b",
"'0'",
"public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }",
"nextDouble",
"{\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }",
"try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }",
"catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }",
"IOException e",
"{\n e.printStackTrace();\n return Double.NaN;\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return Double.NaN;",
"Double.NaN",
"Double",
"Double.NaN",
"{\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n }",
"double sign = 1;",
"sign",
"1",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b)",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"b != '-'",
"b",
"'-'",
"b != '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }",
"b == '-'",
"b",
"'-'",
"{\n sign = -1;\n b = input.read();\n }",
"sign = -1",
"sign",
"-1",
"1",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '+') {\n b = input.read();\n }",
"b == '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"double ret = b - '0';",
"ret",
"b - '0'",
"b",
"'0'",
"while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }",
"true",
"{\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b < '0' || '9' < b) break;",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"break;",
"ret *= 10",
"ret",
"10",
"ret += b - '0'",
"ret",
"b - '0'",
"b",
"'0'",
"if (b != '.') return sign * ret;",
"b != '.'",
"b",
"'.'",
"return sign * ret;",
"sign * ret",
"sign",
"ret",
"double div = 1;",
"div",
"1",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }",
"ret *= 10",
"ret",
"10",
"ret += b - '0'",
"ret",
"b - '0'",
"b",
"'0'",
"div *= 10",
"div",
"10",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return sign * ret / div;",
"sign * ret / div",
"sign * ret",
"sign",
"ret",
"div",
"public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }",
"nextChar",
"{\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }",
"try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }",
"catch (IOException e) {\n e.printStackTrace();\n return 0;\n }",
"IOException e",
"{\n e.printStackTrace();\n return 0;\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return 0;",
"0",
"{\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n }",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while (Character.isWhitespace(b)) {\n b = input.read();\n }",
"Character.isWhitespace(b)",
"Character.isWhitespace",
"Character",
"b",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return (char) b;",
"(char) b",
"public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"nextStr",
"{\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"IOException e",
"{\n e.printStackTrace();\n return \"\";\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return \"\";",
"\"\"",
"{\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while (Character.isWhitespace(b)) {\n b = input.read();\n }",
"Character.isWhitespace(b)",
"Character.isWhitespace",
"Character",
"b",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }",
"b != -1 && !Character.isWhitespace(b)",
"b != -1",
"b",
"-1",
"1",
"!Character.isWhitespace(b)",
"Character.isWhitespace(b)",
"Character.isWhitespace",
"Character",
"b",
"{\n sb.append((char) b);\n b = input.read();\n }",
"sb.append((char) b)",
"sb.append",
"sb",
"(char) b",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"nextLine",
"{\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"IOException e",
"{\n e.printStackTrace();\n return \"\";\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return \"\";",
"\"\"",
"{\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }",
"b != -1 && b != '\\n'",
"b != -1",
"b",
"-1",
"1",
"b != '\\n'",
"b",
"'\\n'",
"{\n sb.append((char) b);\n b = input.read();\n }",
"sb.append((char) b)",
"sb.append",
"sb",
"(char) b",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"nextIntArray",
"{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextInt();\n }",
"{\n res[i] = nextInt();\n }",
"res[i] = nextInt()",
"res[i]",
"res",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"int n",
"n",
"public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }",
"nextIntArrayDec",
"{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextInt() - 1;\n }",
"{\n res[i] = nextInt() - 1;\n }",
"res[i] = nextInt() - 1",
"res[i]",
"res",
"i",
"nextInt() - 1",
"nextInt()",
"nextInt",
"1",
"return res;",
"res",
"int n",
"n",
"public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }",
"nextIntArray1Index",
"{\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }",
"int[] res = new int[n + 1];",
"res",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i + 1] = nextInt();\n }",
"{\n res[i + 1] = nextInt();\n }",
"res[i + 1] = nextInt()",
"res[i + 1]",
"res",
"i + 1",
"i",
"1",
"nextInt()",
"nextInt",
"return res;",
"res",
"int n",
"n",
"public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"nextLongArray",
"{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextLong();\n }",
"{\n res[i] = nextLong();\n }",
"res[i] = nextLong()",
"res[i]",
"res",
"i",
"nextLong()",
"nextLong",
"return res;",
"res",
"int n",
"n",
"public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }",
"nextLongArrayDec",
"{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }",
"long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextLong() - 1;\n }",
"{\n res[i] = nextLong() - 1;\n }",
"res[i] = nextLong() - 1",
"res[i]",
"res",
"i",
"nextLong() - 1",
"nextLong()",
"nextLong",
"1",
"return res;",
"res",
"int n",
"n",
"public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }",
"nextLongArray1Index",
"{\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }",
"long[] res = new long[n + 1];",
"res",
"new long[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i + 1] = nextLong();\n }",
"{\n res[i + 1] = nextLong();\n }",
"res[i + 1] = nextLong()",
"res[i + 1]",
"res",
"i + 1",
"i",
"1",
"nextLong()",
"nextLong",
"return res;",
"res",
"int n",
"n",
"public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }",
"nextDoubleArray",
"{\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }",
"double[] res = new double[n];",
"res",
"new double[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextDouble();\n }",
"{\n res[i] = nextDouble();\n }",
"res[i] = nextDouble()",
"res[i]",
"res",
"i",
"nextDouble()",
"nextDouble",
"return res;",
"res",
"int n",
"n",
"public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n int N = in.nextInt(), K = in.nextInt();\n int[] p = in.nextIntArray(N);\n Arrays.sort(p);\n int sum = 0;\n for(int i = 0; i < K; i++){\n sum += p[i];\n }\n out.println(sum);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n int N = in.nextInt(), K = in.nextInt();\n int[] p = in.nextIntArray(N);\n Arrays.sort(p);\n int sum = 0;\n for(int i = 0; i < K; i++){\n sum += p[i];\n }\n out.println(sum);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.math.BigDecimal;
import java.util.*;
@SuppressWarnings("unused")
public class Main {
FastScanner in;
PrintWriter out;
final static int MOD = (int)1e9+7;
void solve(){
int N = in.nextInt(), K = in.nextInt();
int[] p = in.nextIntArray(N);
Arrays.sort(p);
int sum = 0;
for(int i = 0; i < K; i++){
sum += p[i];
}
out.println(sum);
}
public static void main(String[] args) {
new Main().m();
}
private void m() {
in = new FastScanner(System.in);
out = new PrintWriter(System.out);
/*
try {
String path = "input.txt";
out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));
}catch (IOException e){
e.printStackTrace();
}
*/
solve();
out.flush();
in.close();
out.close();
}
static class FastScanner {
private Reader input;
public FastScanner() {this(System.in);}
public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}
public void close() {
try {
this.input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) nl;
}
public long nextLong() {
try {
int sign = 1;
int b = input.read();
while ((b < '0' || '9' < b) && b != '-' && b != '+') {
b = input.read();
}
if (b == '-') {
sign = -1;
b = input.read();
} else if (b == '+') {
b = input.read();
}
long ret = b - '0';
while (true) {
b = input.read();
if (b < '0' || '9' < b) return ret * sign;
ret *= 10;
ret += b - '0';
}
} catch (IOException e) {
e.printStackTrace();
return -1;
}
}
public double nextDouble() {
try {
double sign = 1;
int b = input.read();
while ((b < '0' || '9' < b) && b != '-' && b != '+') {
b = input.read();
}
if (b == '-') {
sign = -1;
b = input.read();
} else if (b == '+') {
b = input.read();
}
double ret = b - '0';
while (true) {
b = input.read();
if (b < '0' || '9' < b) break;
ret *= 10;
ret += b - '0';
}
if (b != '.') return sign * ret;
double div = 1;
b = input.read();
while ('0' <= b && b <= '9') {
ret *= 10;
ret += b - '0';
div *= 10;
b = input.read();
}
return sign * ret / div;
} catch (IOException e) {
e.printStackTrace();
return Double.NaN;
}
}
public char nextChar() {
try {
int b = input.read();
while (Character.isWhitespace(b)) {
b = input.read();
}
return (char) b;
} catch (IOException e) {
e.printStackTrace();
return 0;
}
}
public String nextStr() {
try {
StringBuilder sb = new StringBuilder();
int b = input.read();
while (Character.isWhitespace(b)) {
b = input.read();
}
while (b != -1 && !Character.isWhitespace(b)) {
sb.append((char) b);
b = input.read();
}
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
return "";
}
}
public String nextLine() {
try {
StringBuilder sb = new StringBuilder();
int b = input.read();
while (b != -1 && b != '\n') {
sb.append((char) b);
b = input.read();
}
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
return "";
}
}
public int[] nextIntArray(int n) {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt();
}
return res;
}
public int[] nextIntArrayDec(int n) {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt() - 1;
}
return res;
}
public int[] nextIntArray1Index(int n) {
int[] res = new int[n + 1];
for (int i = 0; i < n; i++) {
res[i + 1] = nextInt();
}
return res;
}
public long[] nextLongArray(int n) {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong();
}
return res;
}
public long[] nextLongArrayDec(int n) {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong() - 1;
}
return res;
}
public long[] nextLongArray1Index(int n) {
long[] res = new long[n + 1];
for (int i = 0; i < n; i++) {
res[i + 1] = nextLong();
}
return res;
}
public double[] nextDoubleArray(int n) {
double[] res = new double[n];
for (int i = 0; i < n; i++) {
res[i] = nextDouble();
}
return res;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
14,
2,
13,
17,
29,
17,
29,
2,
2,
4,
18,
13,
13,
4,
18,
13,
17,
17,
23,
13,
12,
13,
30,
42,
2,
13,
17,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
4,
18,
4,
18,
13,
17,
29,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
41,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
49,
59
],
[
39,
60
],
[
60,
61
],
[
34,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
70,
80
],
[
80,
81
],
[
80,
82
],
[
69,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
64,
88
],
[
88,
89
],
[
62,
90
],
[
90,
91
],
[
62,
92
],
[
92,
93
],
[
34,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
96,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
96,
110
],
[
110,
111
],
[
110,
112
],
[
96,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
113,
124
],
[
125,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
130,
131
],
[
96,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
96,
136
],
[
136,
137
],
[
136,
138
],
[
96,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
139,
147
],
[
147,
148
],
[
148,
149
],
[
139,
150
],
[
151,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
96,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
94,
164
],
[
164,
165
],
[
34,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
166,
170
],
[
170,
171
],
[
166,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
166,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
181,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
191,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
180,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
166,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
210,
213
],
[
213,
214
],
[
166,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
219,
222
],
[
222,
223
],
[
166,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
228,
231
],
[
231,
232
],
[
166,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
239,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
249,
256
],
[
235,
257
],
[
257,
258
],
[
166,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
261,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
269,
270
],
[
270,
271
],
[
265,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
276,
277
],
[
261,
278
],
[
278,
279
]
]
| [
"import java.io.BufferedOutputStream;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.math.BigInteger;\nimport java.sql.SQLOutput;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.StringTokenizer;\nimport javax.swing.plaf.IconUIResource;\n\n\n class Main {\n\n public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));\n\n static class FastReader {\n\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String[] nextSArray() {\n String sr[] = null;\n try {\n sr = br.readLine().trim().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return sr;\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return str;\n }\n }\n\n // static int MOD=1000000000+7;\n// public static void sortbyCol(int arr[][],int col)\n// {\n// Arrays.sort(arr,new Comparator<int[]>(){\n// @Override\n// public int compare(int[] o1, int[] o2) {\n// // To sort in descending order revert\n// // the '>' Operator\n// if(o1[col]>o2[col])\n// return 1;\n// else\n// return -1;\n// }\n// });\n// }\n static int countbits(int a) {\n if (a == 0)\n return 0;\n return (int) (Math.log(a) / Math.log(2) + 1);\n }\n\n static int reversebits(int n, int pos) {\n while (pos > 0) {\n if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;\n pos = pos >> 1;\n }\n return n;\n }\n\n public static void main(String[] args) throws java.lang.Exception {\n FastReader sc = new FastReader();\n// int t1=sc.nextInt();\n//\n// for(int t=0;t<t1;++t)\n// {\n//\n// }\n int n=sc.nextInt();\n int k=sc.nextInt();\n ArrayList<Integer>al=new ArrayList<>();\n for(int i=0;i<n;++i)\n {\n al.add(sc.nextInt());\n }\n Collections.sort(al);\n int sum=0;\n for(int i=0;i<k;++i)\n {\n sum+=al.get(i);\n }\n System.out.println(sum);\n\n\n }\n }\n\n\n\n// out.println(al.toString().replaceAll(\"[\\\\[|\\\\]|,]\",\"\"));",
"import java.io.BufferedOutputStream;",
"BufferedOutputStream",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.sql.SQLOutput;",
"SQLOutput",
"java.sql",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import javax.swing.plaf.IconUIResource;",
"IconUIResource",
"javax.swing.plaf",
"class Main {\n\n public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));\n\n static class FastReader {\n\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String[] nextSArray() {\n String sr[] = null;\n try {\n sr = br.readLine().trim().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return sr;\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return str;\n }\n }\n\n // static int MOD=1000000000+7;\n// public static void sortbyCol(int arr[][],int col)\n// {\n// Arrays.sort(arr,new Comparator<int[]>(){\n// @Override\n// public int compare(int[] o1, int[] o2) {\n// // To sort in descending order revert\n// // the '>' Operator\n// if(o1[col]>o2[col])\n// return 1;\n// else\n// return -1;\n// }\n// });\n// }\n static int countbits(int a) {\n if (a == 0)\n return 0;\n return (int) (Math.log(a) / Math.log(2) + 1);\n }\n\n static int reversebits(int n, int pos) {\n while (pos > 0) {\n if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;\n pos = pos >> 1;\n }\n return n;\n }\n\n public static void main(String[] args) throws java.lang.Exception {\n FastReader sc = new FastReader();\n// int t1=sc.nextInt();\n//\n// for(int t=0;t<t1;++t)\n// {\n//\n// }\n int n=sc.nextInt();\n int k=sc.nextInt();\n ArrayList<Integer>al=new ArrayList<>();\n for(int i=0;i<n;++i)\n {\n al.add(sc.nextInt());\n }\n Collections.sort(al);\n int sum=0;\n for(int i=0;i<k;++i)\n {\n sum+=al.get(i);\n }\n System.out.println(sum);\n\n\n }\n }",
"Main",
"public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));",
"out",
"new PrintWriter(new BufferedOutputStream(System.out))",
"// static int MOD=1000000000+7;\n// public static void sortbyCol(int arr[][],int col)\n// {\n// Arrays.sort(arr,new Comparator<int[]>(){\n// @Override\n// public int compare(int[] o1, int[] o2) {\n// // To sort in descending order revert\n// // the '>' Operator\n// if(o1[col]>o2[col])\n// return 1;\n// else\n// return -1;\n// }\n// });\n// }\n static int countbits(int a) {\n if (a == 0)\n return 0;\n return (int) (Math.log(a) / Math.log(2) + 1);\n }",
"countbits",
"{\n if (a == 0)\n return 0;\n return (int) (Math.log(a) / Math.log(2) + 1);\n }",
"if (a == 0)\n return 0;",
"a == 0",
"a",
"0",
"return 0;",
"0",
"return (int) (Math.log(a) / Math.log(2) + 1);",
"(int) (Math.log(a) / Math.log(2) + 1)",
"Math.log(a) / Math.log(2)",
"Math.log(a)",
"Math.log",
"Math",
"a",
"Math.log(2)",
"Math.log",
"Math",
"2",
"1",
"int a",
"a",
"static int reversebits(int n, int pos) {\n while (pos > 0) {\n if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;\n pos = pos >> 1;\n }\n return n;\n }",
"reversebits",
"{\n while (pos > 0) {\n if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;\n pos = pos >> 1;\n }\n return n;\n }",
"while (pos > 0) {\n if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;\n pos = pos >> 1;\n }",
"pos > 0",
"pos",
"0",
"{\n if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;\n pos = pos >> 1;\n }",
"if ((n & pos) > 0) {\n n -= pos;\n } else\n n += pos;",
"(n & pos) > 0",
"(n & pos)",
"n",
"pos",
"0",
"{\n n -= pos;\n }",
"n -= pos",
"n",
"pos",
"n += pos",
"n",
"pos",
"pos = pos >> 1",
"pos",
"pos >> 1",
"pos",
"1",
"return n;",
"n",
"int n",
"n",
"int pos",
"pos",
"public static void main(String[] args) throws java.lang.Exception {\n FastReader sc = new FastReader();\n// int t1=sc.nextInt();\n//\n// for(int t=0;t<t1;++t)\n// {\n//\n// }\n int n=sc.nextInt();\n int k=sc.nextInt();\n ArrayList<Integer>al=new ArrayList<>();\n for(int i=0;i<n;++i)\n {\n al.add(sc.nextInt());\n }\n Collections.sort(al);\n int sum=0;\n for(int i=0;i<k;++i)\n {\n sum+=al.get(i);\n }\n System.out.println(sum);\n\n\n }",
"main",
"{\n FastReader sc = new FastReader();\n// int t1=sc.nextInt();\n//\n// for(int t=0;t<t1;++t)\n// {\n//\n// }\n int n=sc.nextInt();\n int k=sc.nextInt();\n ArrayList<Integer>al=new ArrayList<>();\n for(int i=0;i<n;++i)\n {\n al.add(sc.nextInt());\n }\n Collections.sort(al);\n int sum=0;\n for(int i=0;i<k;++i)\n {\n sum+=al.get(i);\n }\n System.out.println(sum);\n\n\n }",
"FastReader sc = new FastReader();",
"sc",
"new FastReader()",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<Integer>al=new ArrayList<>();",
"al",
"new ArrayList<>()",
"for(int i=0;i<n;++i)\n {\n al.add(sc.nextInt());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n al.add(sc.nextInt());\n }",
"{\n al.add(sc.nextInt());\n }",
"al.add(sc.nextInt())",
"al.add",
"al",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(al)",
"Collections.sort",
"Collections",
"al",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;++i)\n {\n sum+=al.get(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"++i",
"++i",
"i",
"{\n sum+=al.get(i);\n }",
"{\n sum+=al.get(i);\n }",
"sum+=al.get(i)",
"sum",
"al.get(i)",
"al.get",
"al",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"static class FastReader {\n\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String[] nextSArray() {\n String sr[] = null;\n try {\n sr = br.readLine().trim().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return sr;\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return str;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"br = new BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String[] nextSArray() {\n String sr[] = null;\n try {\n sr = br.readLine().trim().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return sr;\n }",
"nextSArray",
"{\n String sr[] = null;\n try {\n sr = br.readLine().trim().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return sr;\n }",
"String sr[] = null;",
"sr",
"null",
"try {\n sr = br.readLine().trim().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n sr = br.readLine().trim().split(\" \");\n }",
"sr = br.readLine().trim().split(\" \")",
"sr",
"br.readLine().trim().split(\" \")",
"br.readLine().trim().split",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"return sr;",
"sr",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str"
]
| import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
import javax.swing.plaf.IconUIResource;
class Main {
public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String[] nextSArray() {
String sr[] = null;
try {
sr = br.readLine().trim().split(" ");
} catch (IOException e) {
e.printStackTrace();
}
return sr;
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
// static int MOD=1000000000+7;
// public static void sortbyCol(int arr[][],int col)
// {
// Arrays.sort(arr,new Comparator<int[]>(){
// @Override
// public int compare(int[] o1, int[] o2) {
// // To sort in descending order revert
// // the '>' Operator
// if(o1[col]>o2[col])
// return 1;
// else
// return -1;
// }
// });
// }
static int countbits(int a) {
if (a == 0)
return 0;
return (int) (Math.log(a) / Math.log(2) + 1);
}
static int reversebits(int n, int pos) {
while (pos > 0) {
if ((n & pos) > 0) {
n -= pos;
} else
n += pos;
pos = pos >> 1;
}
return n;
}
public static void main(String[] args) throws java.lang.Exception {
FastReader sc = new FastReader();
// int t1=sc.nextInt();
//
// for(int t=0;t<t1;++t)
// {
//
// }
int n=sc.nextInt();
int k=sc.nextInt();
ArrayList<Integer>al=new ArrayList<>();
for(int i=0;i<n;++i)
{
al.add(sc.nextInt());
}
Collections.sort(al);
int sum=0;
for(int i=0;i<k;++i)
{
sum+=al.get(i);
}
System.out.println(sum);
}
}
// out.println(al.toString().replaceAll("[\\[|\\]|,]",""));
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
28,
13,
4,
18,
13,
17,
30,
30,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
106,
14
],
[
106,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
17,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
53,
58
],
[
17,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
59,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
17,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
17,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
78,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
17,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
15,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
]
| [
"\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String str1 = scanner.nextLine();\n String str2 = scanner.nextLine();\n int price = 0;\n List<Integer> prices = new ArrayList<>();\n int N = Integer.parseInt(str1.split(\" \")[0]);\n int K = Integer.parseInt(str1.split(\" \")[1]);\n for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }\n Collections.sort(prices);\n for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }\n System.out.println(price);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String str1 = scanner.nextLine();\n String str2 = scanner.nextLine();\n int price = 0;\n List<Integer> prices = new ArrayList<>();\n int N = Integer.parseInt(str1.split(\" \")[0]);\n int K = Integer.parseInt(str1.split(\" \")[1]);\n for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }\n Collections.sort(prices);\n for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }\n System.out.println(price);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String str1 = scanner.nextLine();\n String str2 = scanner.nextLine();\n int price = 0;\n List<Integer> prices = new ArrayList<>();\n int N = Integer.parseInt(str1.split(\" \")[0]);\n int K = Integer.parseInt(str1.split(\" \")[1]);\n for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }\n Collections.sort(prices);\n for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }\n System.out.println(price);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n String str1 = scanner.nextLine();\n String str2 = scanner.nextLine();\n int price = 0;\n List<Integer> prices = new ArrayList<>();\n int N = Integer.parseInt(str1.split(\" \")[0]);\n int K = Integer.parseInt(str1.split(\" \")[1]);\n for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }\n Collections.sort(prices);\n for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }\n System.out.println(price);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String str1 = scanner.nextLine();",
"str1",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String str2 = scanner.nextLine();",
"str2",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"int price = 0;",
"price",
"0",
"List<Integer> prices = new ArrayList<>();",
"prices",
"new ArrayList<>()",
"int N = Integer.parseInt(str1.split(\" \")[0]);",
"N",
"Integer.parseInt(str1.split(\" \")[0])",
"Integer.parseInt",
"Integer",
"str1.split(\" \")[0]",
"str1.split(\" \")",
"str1.split",
"str1",
"\" \"",
"0",
"int K = Integer.parseInt(str1.split(\" \")[1]);",
"K",
"Integer.parseInt(str1.split(\" \")[1])",
"Integer.parseInt",
"Integer",
"str1.split(\" \")[1]",
"str1.split(\" \")",
"str1.split",
"str1",
"\" \"",
"1",
"for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }",
"String s",
"str2.split(\" \")",
"str2.split",
"str2",
"\" \"",
"{\n prices.add(Integer.parseInt(s));\n }",
"{\n prices.add(Integer.parseInt(s));\n }",
"prices.add(Integer.parseInt(s))",
"prices.add",
"prices",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"Collections.sort(prices)",
"Collections.sort",
"Collections",
"prices",
"for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n price += prices.get(i);\n }",
"{\n price += prices.get(i);\n }",
"price += prices.get(i)",
"price",
"prices.get(i)",
"prices.get",
"prices",
"i",
"System.out.println(price)",
"System.out.println",
"System.out",
"System",
"System.out",
"price",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String str1 = scanner.nextLine();\n String str2 = scanner.nextLine();\n int price = 0;\n List<Integer> prices = new ArrayList<>();\n int N = Integer.parseInt(str1.split(\" \")[0]);\n int K = Integer.parseInt(str1.split(\" \")[1]);\n for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }\n Collections.sort(prices);\n for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }\n System.out.println(price);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String str1 = scanner.nextLine();\n String str2 = scanner.nextLine();\n int price = 0;\n List<Integer> prices = new ArrayList<>();\n int N = Integer.parseInt(str1.split(\" \")[0]);\n int K = Integer.parseInt(str1.split(\" \")[1]);\n for(String s : str2.split(\" \")){\n prices.add(Integer.parseInt(s));\n }\n Collections.sort(prices);\n for (int i = 0; i < K; i++) {\n price += prices.get(i);\n }\n System.out.println(price);\n }\n}",
"Main"
]
|
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String str1 = scanner.nextLine();
String str2 = scanner.nextLine();
int price = 0;
List<Integer> prices = new ArrayList<>();
int N = Integer.parseInt(str1.split(" ")[0]);
int K = Integer.parseInt(str1.split(" ")[1]);
for(String s : str2.split(" ")){
prices.add(Integer.parseInt(s));
}
Collections.sort(prices);
for (int i = 0; i < K; i++) {
price += prices.get(i);
}
System.out.println(price);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
17,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
4,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
99,
14
],
[
99,
15
],
[
15,
16
],
[
15,
17
],
[
99,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
35,
45
],
[
45,
46
],
[
46,
47
],
[
35,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
20,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
56,
61
],
[
20,
62
],
[
62,
63
],
[
62,
64
],
[
20,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
65,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
20,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
99,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
91,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
]
| [
"/*\npackage com.company.practice;\n*/\n\nimport java.util.Arrays;\nimport java.util.Scanner;\nimport java.lang.*;\n\nimport static java.lang.Character.isUpperCase;\n\npublic class Main {\n public static Scanner key = new Scanner(System.in);\n public static void solveJuice()\n {\n int n = key.nextInt();\n int k = key.nextInt();\n int[] f = new int[n];\n for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();\n Arrays.sort(f,0,n);\n int sum = 0;\n for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }\n System.out.println(sum);\n }\n public static void main(String[] args)\n {\n solveJuice();\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.*;",
"lang.*",
"java",
"import static java.lang.Character.isUpperCase;",
"import static java.lang.Character.isUpperCase;",
"import static java.lang.Character.isUpperCase;",
"public class Main {\n public static Scanner key = new Scanner(System.in);\n public static void solveJuice()\n {\n int n = key.nextInt();\n int k = key.nextInt();\n int[] f = new int[n];\n for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();\n Arrays.sort(f,0,n);\n int sum = 0;\n for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }\n System.out.println(sum);\n }\n public static void main(String[] args)\n {\n solveJuice();\n }\n}",
"Main",
"public static Scanner key = new Scanner(System.in);",
"key",
"new Scanner(System.in)",
"public static void solveJuice()\n {\n int n = key.nextInt();\n int k = key.nextInt();\n int[] f = new int[n];\n for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();\n Arrays.sort(f,0,n);\n int sum = 0;\n for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }\n System.out.println(sum);\n }",
"solveJuice",
"{\n int n = key.nextInt();\n int k = key.nextInt();\n int[] f = new int[n];\n for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();\n Arrays.sort(f,0,n);\n int sum = 0;\n for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }\n System.out.println(sum);\n }",
"int n = key.nextInt();",
"n",
"key.nextInt()",
"key.nextInt",
"key",
"int k = key.nextInt();",
"k",
"key.nextInt()",
"key.nextInt",
"key",
"int[] f = new int[n];",
"f",
"new int[n]",
"n",
"for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"f[i] = key.nextInt();",
"f[i] = key.nextInt()",
"f[i]",
"f",
"i",
"key.nextInt()",
"key.nextInt",
"key",
"Arrays.sort(f,0,n)",
"Arrays.sort",
"Arrays",
"f",
"0",
"n",
"int sum = 0;",
"sum",
"0",
"for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }",
"int j =0;",
"int j =0;",
"j",
"0",
"j <= k-1",
"j",
"k-1",
"k",
"1",
"j++",
"j++",
"j",
"{\n sum += f[j];\n }",
"{\n sum += f[j];\n }",
"sum += f[j]",
"sum",
"f[j]",
"f",
"j",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"public static void main(String[] args)\n {\n solveJuice();\n }",
"main",
"{\n solveJuice();\n }",
"solveJuice()",
"solveJuice",
"String[] args",
"args",
"public class Main {\n public static Scanner key = new Scanner(System.in);\n public static void solveJuice()\n {\n int n = key.nextInt();\n int k = key.nextInt();\n int[] f = new int[n];\n for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();\n Arrays.sort(f,0,n);\n int sum = 0;\n for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }\n System.out.println(sum);\n }\n public static void main(String[] args)\n {\n solveJuice();\n }\n}",
"public class Main {\n public static Scanner key = new Scanner(System.in);\n public static void solveJuice()\n {\n int n = key.nextInt();\n int k = key.nextInt();\n int[] f = new int[n];\n for(int i = 0;i <= n-1;i++)\n f[i] = key.nextInt();\n Arrays.sort(f,0,n);\n int sum = 0;\n for(int j =0;j <= k-1;j++)\n {\n sum += f[j];\n }\n System.out.println(sum);\n }\n public static void main(String[] args)\n {\n solveJuice();\n }\n}",
"Main"
]
| /*
package com.company.practice;
*/
import java.util.Arrays;
import java.util.Scanner;
import java.lang.*;
import static java.lang.Character.isUpperCase;
public class Main {
public static Scanner key = new Scanner(System.in);
public static void solveJuice()
{
int n = key.nextInt();
int k = key.nextInt();
int[] f = new int[n];
for(int i = 0;i <= n-1;i++)
f[i] = key.nextInt();
Arrays.sort(f,0,n);
int sum = 0;
for(int j =0;j <= k-1;j++)
{
sum += f[j];
}
System.out.println(sum);
}
public static void main(String[] args)
{
solveJuice();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
30,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
4,
18,
13,
13,
29,
4,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
4,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
13,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
6,
13,
12,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
395,
38
],
[
395,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
41,
52
],
[
52,
53
],
[
52,
54
],
[
41,
55
],
[
55,
56
],
[
55,
57
],
[
41,
58
],
[
58,
59
],
[
58,
60
],
[
41,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
61,
66
],
[
41,
67
],
[
67,
68
],
[
68,
69
],
[
39,
70
],
[
70,
71
],
[
395,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
76,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
76,
97
],
[
97,
98
],
[
97,
99
],
[
76,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
100,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
76,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
74,
122
],
[
122,
123
],
[
74,
124
],
[
124,
125
],
[
74,
126
],
[
126,
127
],
[
395,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
128,
132
],
[
132,
133
],
[
132,
134
],
[
128,
136
],
[
136,
137
],
[
128,
138
],
[
138,
139
],
[
128,
140
],
[
140,
141
],
[
128,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
142,
150
],
[
150,
151
],
[
128,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
155,
160
],
[
160,
161
],
[
161,
162
],
[
154,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
171,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
180,
183
],
[
167,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
154,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
128,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
199,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
211,
212
],
[
199,
213
],
[
213,
214
],
[
213,
215
],
[
199,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
220,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
199,
229
],
[
229,
230
],
[
229,
231
],
[
199,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
232,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
243
],
[
243,
244
],
[
243,
245
],
[
238,
246
],
[
246,
247
],
[
247,
248
],
[
237,
249
],
[
249,
250
],
[
249,
251
],
[
237,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
254,
256
],
[
237,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
199,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
128,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
267,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
265,
282
],
[
282,
283
],
[
128,
284
],
[
284,
285
],
[
284,
286
],
[
286,
287
],
[
287,
288
],
[
291,
289
],
[
301,
290
],
[
298,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
291,
295
],
[
295,
296
],
[
295,
297
],
[
298,
298
],
[
298,
299
],
[
298,
300
],
[
301,
301
],
[
301,
302
],
[
301,
303
],
[
291,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
284,
308
],
[
308,
309
],
[
128,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
314,
317
],
[
310,
318
],
[
318,
319
],
[
128,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
322,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
327,
332
],
[
332,
333
],
[
332,
334
],
[
327,
335
],
[
335,
336
],
[
336,
337
],
[
327,
338
],
[
338,
339
],
[
339,
340
],
[
340,
341
],
[
340,
342
],
[
339,
343
],
[
343,
344
],
[
322,
345
],
[
345,
346
],
[
320,
347
],
[
347,
348
],
[
320,
349
],
[
349,
350
],
[
128,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
395,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
357,
361
],
[
361,
362
],
[
361,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
361,
367
],
[
367,
368
],
[
357,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
369,
377
],
[
377,
378
],
[
357,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
357,
385
],
[
385,
386
],
[
385,
387
],
[
387,
388
],
[
388,
389
],
[
389,
390
],
[
388,
391
],
[
385,
392
],
[
392,
393
],
[
0,
394
],
[
394,
395
],
[
394,
396
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.io.BufferedWriter;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n return nextIntArray(n, 0);\n }\n\n public int[] nextIntArray(int n, int startFrom) {\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.Writer;",
"Writer",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n return nextIntArray(n, 0);\n }\n\n public int[] nextIntArray(int n, int startFrom) {\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"OutputWriter out = new OutputWriter(outputStream);",
"out",
"new OutputWriter(outputStream)",
"BMixJuice solver = new BMixJuice();",
"solver",
"new BMixJuice()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BMixJuice {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }\n\n }",
"BMixJuice",
"public void solve(int testNumber, InputReader in, OutputWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }",
"solve",
"{\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int[] arr = in.nextIntArray(n);",
"arr",
"in.nextIntArray(n)",
"in.nextIntArray",
"in",
"n",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < k; i++) {\n sum += arr[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n sum += arr[i];\n }",
"{\n sum += arr[i];\n }",
"sum += arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"out.println(sum)",
"out.println",
"out",
"sum",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"OutputWriter out",
"out",
"static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n return nextIntArray(n, 0);\n }\n\n public int[] nextIntArray(int n, int startFrom) {\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private InputReader.SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"if (numChars == -1) {\n throw new InputMismatchException();\n }",
"numChars == -1",
"numChars",
"-1",
"1",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0) {\n return -1;\n }",
"numChars <= 0",
"numChars",
"0",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = read();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = read();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }",
"if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"isSpaceChar",
"{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"if (filter != null) {\n return filter.isSpaceChar(c);\n }",
"filter != null",
"filter",
"null",
"{\n return filter.isSpaceChar(c);\n }",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return isWhitespace(c);",
"isWhitespace(c)",
"isWhitespace",
"c",
"int c",
"c",
"public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isWhitespace",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public int[] nextIntArray(int n) {\n return nextIntArray(n, 0);\n }",
"nextIntArray",
"{\n return nextIntArray(n, 0);\n }",
"return nextIntArray(n, 0);",
"nextIntArray(n, 0)",
"nextIntArray",
"n",
"0",
"int n",
"n",
"public int[] nextIntArray(int n, int startFrom) {\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }",
"nextIntArray",
"{\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }",
"int[] array = new int[n];",
"array",
"new int[n]",
"n",
"for (int i = startFrom; i < n; ++i) array[i] = nextInt();",
"int i = startFrom;",
"int i = startFrom;",
"i",
"startFrom",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"array[i] = nextInt();",
"array[i] = nextInt()",
"array[i]",
"array",
"i",
"nextInt()",
"nextInt",
"return array;",
"array",
"int n",
"n",
"int startFrom",
"startFrom",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"OutputWriter",
"{\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }",
"OutputWriter",
"{\n this.writer = new PrintWriter(writer);\n }",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void close() {\n writer.close();\n }",
"close",
"{\n writer.close();\n }",
"writer.close()",
"writer.close",
"writer",
"public void println(long i) {\n writer.println(i);\n }",
"println",
"{\n writer.println(i);\n }",
"writer.println(i)",
"writer.println",
"writer",
"i",
"long i",
"i",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n return nextIntArray(n, 0);\n }\n\n public int[] nextIntArray(int n, int startFrom) {\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] arr = in.nextIntArray(n);\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n out.println(sum);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n return nextIntArray(n, 0);\n }\n\n public int[] nextIntArray(int n, int startFrom) {\n int[] array = new int[n];\n for (int i = startFrom; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
OutputWriter out = new OutputWriter(outputStream);
BMixJuice solver = new BMixJuice();
solver.solve(1, in, out);
out.close();
}
static class BMixJuice {
public void solve(int testNumber, InputReader in, OutputWriter out) {
int n = in.nextInt();
int k = in.nextInt();
int[] arr = in.nextIntArray(n);
Arrays.sort(arr);
int sum = 0;
for (int i = 0; i < k; i++) {
sum += arr[i];
}
out.println(sum);
}
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private InputReader.SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1) {
throw new InputMismatchException();
}
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0) {
return -1;
}
}
return buf[curChar++];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public int[] nextIntArray(int n) {
return nextIntArray(n, 0);
}
public int[] nextIntArray(int n, int startFrom) {
int[] array = new int[n];
for (int i = startFrom; i < n; ++i) array[i] = nextInt();
return array;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void close() {
writer.close();
}
public void println(long i) {
writer.println(i);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
11,
1,
0,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
17,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
120,
8
],
[
120,
9
],
[
9,
10
],
[
120,
11
],
[
11,
12
],
[
120,
13
],
[
13,
14
],
[
120,
15
],
[
15,
16
],
[
120,
17
],
[
17,
18
],
[
120,
19
],
[
19,
20
],
[
120,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
23,
51
],
[
51,
52
],
[
51,
53
],
[
54,
55
],
[
54,
56
],
[
23,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
57,
67
],
[
67,
68
],
[
68,
69
],
[
57,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
23,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
23,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
83,
93
],
[
93,
94
],
[
94,
95
],
[
83,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
23,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
120,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
111,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\npublic class Main {\n int d,j,k,l,o,min;\n public void solve() {\n Scanner sc = new Scanner(System.in);\n int date[] =new int[2];\n for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }\n int[] dat=new int[date[0]];\n for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }\n Arrays.sort(dat);\n for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }\n System.out.println(min);\n }\n public static void main(String[] args) {\n new Main().solve();\n\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n int d,j,k,l,o,min;\n public void solve() {\n Scanner sc = new Scanner(System.in);\n int date[] =new int[2];\n for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }\n int[] dat=new int[date[0]];\n for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }\n Arrays.sort(dat);\n for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }\n System.out.println(min);\n }\n public static void main(String[] args) {\n new Main().solve();\n\n }\n}",
"Main",
"int d",
"d",
"j",
"j",
"k",
"k",
"l",
"l",
"o",
"o",
"min;",
"min",
"public void solve() {\n Scanner sc = new Scanner(System.in);\n int date[] =new int[2];\n for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }\n int[] dat=new int[date[0]];\n for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }\n Arrays.sort(dat);\n for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }\n System.out.println(min);\n }",
"solve",
"{\n Scanner sc = new Scanner(System.in);\n int date[] =new int[2];\n for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }\n int[] dat=new int[date[0]];\n for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }\n Arrays.sort(dat);\n for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }\n System.out.println(min);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int date[] =new int[2];",
"date",
"new int[2]",
"2",
"for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }",
"d=0;",
"d=0",
"d",
"0",
"d<2",
"d",
"2",
"d++",
"d++",
"d",
"{\n date[d] = sc.nextInt();\n }",
"{\n date[d] = sc.nextInt();\n }",
"date[d] = sc.nextInt()",
"date[d]",
"date",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] dat=new int[date[0]];",
"dat",
"new int[date[0]]",
"date[0]",
"date",
"0",
"for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }",
"int o=0;",
"int o=0;",
"o",
"0",
"o<date[0]",
"o",
"date[0]",
"date",
"0",
"o++",
"o++",
"o",
"{\n dat[o]=sc.nextInt();\n }",
"{\n dat[o]=sc.nextInt();\n }",
"dat[o]=sc.nextInt()",
"dat[o]",
"dat",
"o",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(dat)",
"Arrays.sort",
"Arrays",
"dat",
"for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }",
"int o=0;",
"int o=0;",
"o",
"0",
"o<date[1]",
"o",
"date[1]",
"date",
"1",
"o++",
"o++",
"o",
"{\n min=min+dat[o];\n\n }",
"{\n min=min+dat[o];\n\n }",
"min=min+dat[o]",
"min",
"min+dat[o]",
"min",
"dat[o]",
"dat",
"o",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"public static void main(String[] args) {\n new Main().solve();\n\n }",
"main",
"{\n new Main().solve();\n\n }",
"new Main().solve()",
"new Main().solve",
"new Main()",
"String[] args",
"args",
"public class Main {\n int d,j,k,l,o,min;\n public void solve() {\n Scanner sc = new Scanner(System.in);\n int date[] =new int[2];\n for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }\n int[] dat=new int[date[0]];\n for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }\n Arrays.sort(dat);\n for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }\n System.out.println(min);\n }\n public static void main(String[] args) {\n new Main().solve();\n\n }\n}",
"public class Main {\n int d,j,k,l,o,min;\n public void solve() {\n Scanner sc = new Scanner(System.in);\n int date[] =new int[2];\n for(d=0;d<2;d++) {\n date[d] = sc.nextInt();\n }\n int[] dat=new int[date[0]];\n for(int o=0;o<date[0];o++) {\n dat[o]=sc.nextInt();\n }\n Arrays.sort(dat);\n for(int o=0;o<date[1];o++) {\n min=min+dat[o];\n\n }\n System.out.println(min);\n }\n public static void main(String[] args) {\n new Main().solve();\n\n }\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
int d,j,k,l,o,min;
public void solve() {
Scanner sc = new Scanner(System.in);
int date[] =new int[2];
for(d=0;d<2;d++) {
date[d] = sc.nextInt();
}
int[] dat=new int[date[0]];
for(int o=0;o<date[0];o++) {
dat[o]=sc.nextInt();
}
Arrays.sort(dat);
for(int o=0;o<date[1];o++) {
min=min+dat[o];
}
System.out.println(min);
}
public static void main(String[] args) {
new Main().solve();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
80,
8
],
[
80,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
11,
47
],
[
47,
48
],
[
47,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
11,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
9,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
]
| [
"import java.util.PriorityQueue;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t\n\t\tPriorityQueue<Integer> P = new PriorityQueue<>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}\n\t\t\n\t\t// 結果の出力\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\tsc.close();\n\t}\n}",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t\n\t\tPriorityQueue<Integer> P = new PriorityQueue<>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}\n\t\t\n\t\t// 結果の出力\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t\n\t\tPriorityQueue<Integer> P = new PriorityQueue<>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}\n\t\t\n\t\t// 結果の出力\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t\n\t\tPriorityQueue<Integer> P = new PriorityQueue<>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}\n\t\t\n\t\t// 結果の出力\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"PriorityQueue<Integer> P = new PriorityQueue<>();",
"P",
"new PriorityQueue<>()",
"for (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tP.add(sc.nextInt());\n\t\t}",
"{\n\t\t\tP.add(sc.nextInt());\n\t\t}",
"P.add(sc.nextInt())",
"P.add",
"P",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tsum += P.poll();\n\t\t}",
"{\n\t\t\tsum += P.poll();\n\t\t}",
"sum += P.poll()",
"sum",
"P.poll()",
"P.poll",
"P",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t\n\t\tPriorityQueue<Integer> P = new PriorityQueue<>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}\n\t\t\n\t\t// 結果の出力\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t\n\t\tPriorityQueue<Integer> P = new PriorityQueue<>();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tP.add(sc.nextInt());\n\t\t}\n\t\t\n\t\t// 結果の出力\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tsum += P.poll();\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 入力値の取得
int N = sc.nextInt();
int K = sc.nextInt();
PriorityQueue<Integer> P = new PriorityQueue<>();
for (int i = 0; i < N; i++) {
P.add(sc.nextInt());
}
// 結果の出力
int sum = 0;
for (int i = 0; i < K; i++) {
sum += P.poll();
}
System.out.println(sum);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
13,
41,
13,
17,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
14,
2,
13,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
4,
18,
18,
13,
13,
17,
30,
0,
13,
18,
13,
13,
0,
13,
20,
0,
13,
20,
4,
13,
12,
13,
30,
4,
18,
20,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
614,
23
],
[
614,
24
],
[
24,
25
],
[
614,
26
],
[
26,
27
],
[
26,
28
],
[
614,
29
],
[
29,
30
],
[
29,
31
],
[
614,
32
],
[
32,
33
],
[
32,
34
],
[
614,
35
],
[
35,
36
],
[
35,
37
],
[
614,
38
],
[
38,
39
],
[
614,
40
],
[
40,
41
],
[
614,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
44,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
44,
65
],
[
65,
66
],
[
65,
67
],
[
44,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
44,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
614,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
100,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
99,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
95,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
94,
123
],
[
123,
124
],
[
123,
125
],
[
94,
126
],
[
126,
127
],
[
126,
128
],
[
94,
129
],
[
129,
130
],
[
614,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
131,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
139,
143
],
[
143,
144
],
[
143,
145
],
[
139,
147
],
[
147,
148
],
[
139,
149
],
[
149,
150
],
[
139,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
151,
159
],
[
159,
160
],
[
139,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
164,
169
],
[
169,
170
],
[
163,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
179,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
175,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
192,
196
],
[
196,
197
],
[
197,
198
],
[
163,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
139,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
211,
209
],
[
221,
210
],
[
218,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
215
],
[
215,
216
],
[
215,
217
],
[
218,
218
],
[
218,
219
],
[
218,
220
],
[
221,
221
],
[
221,
222
],
[
221,
223
],
[
211,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
204,
228
],
[
228,
229
],
[
139,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
235,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
239,
241
],
[
235,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
230,
246
],
[
246,
247
],
[
139,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
252,
255
],
[
255,
256
],
[
139,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
264,
269
],
[
269,
270
],
[
269,
271
],
[
264,
272
],
[
272,
273
],
[
273,
274
],
[
264,
275
],
[
275,
276
],
[
276,
277
],
[
277,
278
],
[
277,
279
],
[
276,
280
],
[
280,
281
],
[
259,
282
],
[
282,
283
],
[
257,
284
],
[
284,
285
],
[
139,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
288,
294
],
[
294,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
294,
299
],
[
299,
300
],
[
299,
301
],
[
294,
302
],
[
302,
303
],
[
303,
304
],
[
294,
305
],
[
306,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
311,
313
],
[
288,
314
],
[
314,
315
],
[
286,
316
],
[
316,
317
],
[
286,
318
],
[
318,
319
],
[
139,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
324,
327
],
[
327,
328
],
[
139,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
336,
341
],
[
341,
342
],
[
341,
343
],
[
336,
344
],
[
344,
345
],
[
345,
346
],
[
336,
347
],
[
347,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
348,
352
],
[
352,
353
],
[
331,
354
],
[
354,
355
],
[
329,
356
],
[
356,
357
],
[
139,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
366,
371
],
[
371,
372
],
[
371,
373
],
[
366,
374
],
[
374,
375
],
[
375,
376
],
[
366,
377
],
[
378,
378
],
[
378,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
379,
383
],
[
383,
384
],
[
383,
385
],
[
360,
386
],
[
386,
387
],
[
358,
388
],
[
388,
389
],
[
358,
390
],
[
390,
391
],
[
139,
392
],
[
392,
393
],
[
392,
394
],
[
394,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
396,
399
],
[
399,
400
],
[
139,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
404,
406
],
[
403,
408
],
[
408,
409
],
[
409,
410
],
[
410,
411
],
[
410,
412
],
[
408,
413
],
[
413,
414
],
[
413,
415
],
[
408,
416
],
[
416,
417
],
[
417,
418
],
[
408,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
420,
424
],
[
424,
425
],
[
403,
426
],
[
426,
427
],
[
401,
428
],
[
428,
429
],
[
139,
430
],
[
430,
431
],
[
430,
432
],
[
432,
433
],
[
433,
434
],
[
433,
435
],
[
432,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
438,
443
],
[
443,
444
],
[
443,
445
],
[
438,
446
],
[
446,
447
],
[
447,
448
],
[
438,
449
],
[
450,
450
],
[
450,
451
],
[
451,
452
],
[
452,
453
],
[
452,
454
],
[
451,
455
],
[
455,
456
],
[
455,
457
],
[
432,
458
],
[
458,
459
],
[
430,
460
],
[
460,
461
],
[
430,
462
],
[
462,
463
],
[
139,
464
],
[
464,
465
],
[
464,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
469,
470
],
[
466,
471
],
[
471,
472
],
[
472,
473
],
[
472,
474
],
[
471,
475
],
[
475,
476
],
[
475,
477
],
[
477,
478
],
[
466,
479
],
[
479,
480
],
[
479,
481
],
[
466,
482
],
[
482,
483
],
[
483,
484
],
[
484,
485
],
[
484,
486
],
[
482,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
488,
491
],
[
487,
492
],
[
492,
493
],
[
492,
494
],
[
494,
495
],
[
466,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
139,
500
],
[
500,
501
],
[
500,
502
],
[
502,
503
],
[
503,
504
],
[
503,
505
],
[
502,
507
],
[
507,
508
],
[
508,
509
],
[
509,
510
],
[
509,
511
],
[
507,
512
],
[
512,
513
],
[
512,
514
],
[
507,
515
],
[
515,
516
],
[
516,
517
],
[
507,
518
],
[
518,
519
],
[
519,
520
],
[
520,
521
],
[
520,
522
],
[
519,
523
],
[
523,
524
],
[
502,
525
],
[
525,
526
],
[
500,
527
],
[
527,
528
],
[
139,
529
],
[
529,
530
],
[
529,
531
],
[
531,
532
],
[
532,
533
],
[
532,
534
],
[
534,
535
],
[
531,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
536,
540
],
[
540,
541
],
[
540,
542
],
[
542,
543
],
[
531,
544
],
[
544,
545
],
[
544,
546
],
[
531,
547
],
[
547,
548
],
[
548,
549
],
[
549,
550
],
[
549,
551
],
[
547,
552
],
[
552,
553
],
[
553,
554
],
[
554,
555
],
[
553,
556
],
[
552,
557
],
[
557,
558
],
[
557,
559
],
[
559,
560
],
[
531,
561
],
[
561,
562
],
[
562,
563
],
[
563,
564
],
[
139,
565
],
[
565,
566
],
[
565,
567
],
[
567,
568
],
[
568,
569
],
[
568,
570
],
[
567,
573
],
[
573,
574
],
[
574,
575
],
[
575,
576
],
[
575,
577
],
[
573,
578
],
[
578,
579
],
[
578,
580
],
[
573,
581
],
[
581,
582
],
[
582,
583
],
[
573,
584
],
[
585,
585
],
[
585,
586
],
[
586,
587
],
[
587,
588
],
[
588,
589
],
[
588,
590
],
[
586,
591
],
[
591,
592
],
[
591,
593
],
[
586,
594
],
[
594,
595
],
[
595,
596
],
[
586,
597
],
[
598,
598
],
[
598,
599
],
[
599,
600
],
[
600,
601
],
[
601,
602
],
[
601,
603
],
[
600,
604
],
[
599,
605
],
[
605,
606
],
[
567,
607
],
[
607,
608
],
[
565,
609
],
[
609,
610
],
[
565,
611
],
[
611,
612
],
[
0,
613
],
[
613,
614
],
[
613,
615
]
]
| [
"import java.io.FileNotFoundException;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.InputMismatchException;\nimport java.io.FileInputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\n\npublic class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/B3\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] a = in.nextIntArray(n);\n Arrays.sort(a);\n long res = 0;\n for (int i = 0; i < k; i++) {\n res += a[i];\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}\n\n\nclass FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }\n\n int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }\n\n public String next() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n\n public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }\n}",
"import java.io.FileNotFoundException;",
"FileNotFoundException",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.FileInputStream;",
"FileInputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/B3\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] a = in.nextIntArray(n);\n Arrays.sort(a);\n long res = 0;\n for (int i = 0; i < k; i++) {\n res += a[i];\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}",
"Main",
"InputStream is;",
"is",
"int __t__ = 1;",
"__t__",
"1",
"int __f__ = 0;",
"__f__",
"0",
"int __FILE_DEBUG_FLAG__ = __f__;",
"__FILE_DEBUG_FLAG__",
"__f__",
"String __DEBUG_FILE_NAME__ = \"src/B3\";",
"__DEBUG_FILE_NAME__",
"\"src/B3\"",
"FastScanner in;",
"in",
"PrintWriter out;",
"out",
"public void solve() {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] a = in.nextIntArray(n);\n Arrays.sort(a);\n long res = 0;\n for (int i = 0; i < k; i++) {\n res += a[i];\n }\n System.out.println(res);\n }",
"solve",
"{\n int n = in.nextInt();\n int k = in.nextInt();\n int[] a = in.nextIntArray(n);\n Arrays.sort(a);\n long res = 0;\n for (int i = 0; i < k; i++) {\n res += a[i];\n }\n System.out.println(res);\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int[] a = in.nextIntArray(n);",
"a",
"in.nextIntArray(n)",
"in.nextIntArray",
"in",
"n",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"long res = 0;",
"res",
"0",
"for (int i = 0; i < k; i++) {\n res += a[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n res += a[i];\n }",
"{\n res += a[i];\n }",
"res += a[i]",
"res",
"a[i]",
"a",
"i",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }",
"run",
"{\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }",
"if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }",
"__FILE_DEBUG_FLAG__ == __t__",
"__FILE_DEBUG_FLAG__",
"__t__",
"{\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n }",
"try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }",
"catch (FileNotFoundException e) {\n e.printStackTrace();\n }",
"FileNotFoundException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n }",
"is = new FileInputStream(__DEBUG_FILE_NAME__)",
"is",
"new FileInputStream(__DEBUG_FILE_NAME__)",
"System.out.println(\"FILE_INPUT!\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"FILE_INPUT!\"",
"{\n is = System.in;\n }",
"is = System.in",
"is",
"System.in",
"System",
"System.in",
"in = new FastScanner(is)",
"in",
"new FastScanner(is)",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"solve()",
"solve",
"public static void main(final String[] args) {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"final String[] args",
"args",
"class FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }\n\n int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }\n\n public String next() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n\n public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }\n}",
"FastScanner",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }",
"FastScanner",
"{\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n return -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"isEndline",
"{\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"return c == '\\n' || c == '\\r' || c == -1;",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }",
"nextIntArray",
"{\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }",
"int[] array = new int[n];",
"array",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n array[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"array[i] = nextInt();",
"array[i] = nextInt()",
"array[i]",
"array",
"i",
"nextInt()",
"nextInt",
"return array;",
"array",
"int n",
"n",
"public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }",
"nextIntMap",
"{\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }",
"int[][] map = new int[n][m];",
"map",
"new int[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n map[i] = nextIntArray(m);\n }",
"{\n map[i] = nextIntArray(m);\n }",
"map[i] = nextIntArray(m)",
"map[i]",
"map",
"i",
"nextIntArray(m)",
"nextIntArray",
"m",
"return map;",
"map",
"int n",
"n",
"int m",
"m",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }",
"nextLongArray",
"{\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }",
"long[] array = new long[n];",
"array",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n array[i] = nextLong();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"array[i] = nextLong();",
"array[i] = nextLong()",
"array[i]",
"array",
"i",
"nextLong()",
"nextLong",
"return array;",
"array",
"int n",
"n",
"public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }",
"nextLongMap",
"{\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }",
"long[][] map = new long[n][m];",
"map",
"new long[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n map[i] = nextLongArray(m);\n }",
"{\n map[i] = nextLongArray(m);\n }",
"map[i] = nextLongArray(m)",
"map[i]",
"map",
"i",
"nextLongArray(m)",
"nextLongArray",
"m",
"return map;",
"map",
"int n",
"n",
"int m",
"m",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }",
"nextDoubleArray",
"{\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }",
"double[] array = new double[n];",
"array",
"new double[n]",
"n",
"for (int i = 0; i < n; i++)\n array[i] = nextDouble();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"array[i] = nextDouble();",
"array[i] = nextDouble()",
"array[i]",
"array",
"i",
"nextDouble()",
"nextDouble",
"return array;",
"array",
"int n",
"n",
"public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }",
"nextDoubleMap",
"{\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }",
"double[][] map = new double[n][m];",
"map",
"new double[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n map[i] = nextDoubleArray(m);\n }",
"{\n map[i] = nextDoubleArray(m);\n }",
"map[i] = nextDoubleArray(m)",
"map[i]",
"map",
"i",
"nextDoubleArray(m)",
"nextDoubleArray",
"m",
"return map;",
"map",
"int n",
"n",
"int m",
"m",
"public String next() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"next",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }",
"nextStringArray",
"{\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }",
"String[] array = new String[n];",
"array",
"new String[n]",
"n",
"for (int i = 0; i < n; i++)\n array[i] = next();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"array[i] = next();",
"array[i] = next()",
"array[i]",
"array",
"i",
"next()",
"next",
"return array;",
"array",
"int n",
"n",
"public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isEndline(c))\n c = read();",
"isEndline(c)",
"isEndline",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));",
"!isEndline(c)",
"isEndline(c)",
"isEndline",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }",
"nextPackedIntArrays",
"{\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }",
"int[][] res = new int[packN][size];",
"res",
"new int[packN][size]",
"packN",
"size",
"for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }",
"{\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }",
"for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < packN",
"j",
"packN",
"j++",
"j++",
"j",
"{\n res[j][i] = nextInt();\n }",
"{\n res[j][i] = nextInt();\n }",
"res[j][i] = nextInt()",
"res[j][i]",
"res[j]",
"res",
"j",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"int packN",
"packN",
"int size",
"size",
"public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/B3\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] a = in.nextIntArray(n);\n Arrays.sort(a);\n long res = 0;\n for (int i = 0; i < k; i++) {\n res += a[i];\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}",
"public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/B3\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int k = in.nextInt();\n int[] a = in.nextIntArray(n);\n Arrays.sort(a);\n long res = 0;\n for (int i = 0; i < k; i++) {\n res += a[i];\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}",
"Main"
]
| import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.io.FileInputStream;
import java.io.PrintWriter;
import java.util.Arrays;
public class Main {
InputStream is;
int __t__ = 1;
int __f__ = 0;
int __FILE_DEBUG_FLAG__ = __f__;
String __DEBUG_FILE_NAME__ = "src/B3";
FastScanner in;
PrintWriter out;
public void solve() {
int n = in.nextInt();
int k = in.nextInt();
int[] a = in.nextIntArray(n);
Arrays.sort(a);
long res = 0;
for (int i = 0; i < k; i++) {
res += a[i];
}
System.out.println(res);
}
public void run() {
if (__FILE_DEBUG_FLAG__ == __t__) {
try {
is = new FileInputStream(__DEBUG_FILE_NAME__);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
System.out.println("FILE_INPUT!");
} else {
is = System.in;
}
in = new FastScanner(is);
out = new PrintWriter(System.out);
solve();
}
public static void main(final String[] args) {
new Main().run();
}
}
class FastScanner {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
public FastScanner(InputStream stream) {
this.stream = stream;
// stream = new FileInputStream(new File("dec.in"));
}
int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public boolean isEndline(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public int nextInt() {
return Integer.parseInt(next());
}
public int[] nextIntArray(int n) {
int[] array = new int[n];
for (int i = 0; i < n; i++)
array[i] = nextInt();
return array;
}
public int[][] nextIntMap(int n, int m) {
int[][] map = new int[n][m];
for (int i = 0; i < n; i++) {
map[i] = nextIntArray(m);
}
return map;
}
public long nextLong() {
return Long.parseLong(next());
}
public long[] nextLongArray(int n) {
long[] array = new long[n];
for (int i = 0; i < n; i++)
array[i] = nextLong();
return array;
}
public long[][] nextLongMap(int n, int m) {
long[][] map = new long[n][m];
for (int i = 0; i < n; i++) {
map[i] = nextLongArray(m);
}
return map;
}
public double nextDouble() {
return Double.parseDouble(next());
}
public double[] nextDoubleArray(int n) {
double[] array = new double[n];
for (int i = 0; i < n; i++)
array[i] = nextDouble();
return array;
}
public double[][] nextDoubleMap(int n, int m) {
double[][] map = new double[n][m];
for (int i = 0; i < n; i++) {
map[i] = nextDoubleArray(m);
}
return map;
}
public String next() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public String[] nextStringArray(int n) {
String[] array = new String[n];
for (int i = 0; i < n; i++)
array[i] = next();
return array;
}
public String nextLine() {
int c = read();
while (isEndline(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndline(c));
return res.toString();
}
public int[][] nextPackedIntArrays(int packN, int size) {
int[][] res = new int[packN][size];
for (int i = 0; i < size; i++) {
for (int j = 0; j < packN; j++) {
res[j][i] = nextInt();
}
}
return res;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
8,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n int[] p = new int[n];\n for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n \n Arrays.sort(p);\n \n int sum = 0;\n for(int i=0; i<k; i++) {\n sum += p[i];\n }\n \n System.out.println(sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n int[] p = new int[n];\n for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n \n Arrays.sort(p);\n \n int sum = 0;\n for(int i=0; i<k; i++) {\n sum += p[i];\n }\n \n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n int[] p = new int[n];\n for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n \n Arrays.sort(p);\n \n int sum = 0;\n for(int i=0; i<k; i++) {\n sum += p[i];\n }\n \n System.out.println(sum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n int[] p = new int[n];\n for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n \n Arrays.sort(p);\n \n int sum = 0;\n for(int i=0; i<k; i++) {\n sum += p[i];\n }\n \n System.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = Integer.parseInt(sc.next());",
"n",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int k = Integer.parseInt(sc.next());",
"k",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int[] p = new int[n];",
"p",
"new int[n]",
"n",
"for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n p[i] = Integer.parseInt(sc.next());\n }",
"{\n p[i] = Integer.parseInt(sc.next());\n }",
"p[i] = Integer.parseInt(sc.next())",
"p[i]",
"p",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int sum = 0;",
"sum",
"0",
"for(int i=0; i<k; i++) {\n sum += p[i];\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n sum += p[i];\n }",
"{\n sum += p[i];\n }",
"sum += p[i]",
"sum",
"p[i]",
"p",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n int[] p = new int[n];\n for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n \n Arrays.sort(p);\n \n int sum = 0;\n for(int i=0; i<k; i++) {\n sum += p[i];\n }\n \n System.out.println(sum);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n int[] p = new int[n];\n for(int i=0; i<n; i++) {\n p[i] = Integer.parseInt(sc.next());\n }\n \n Arrays.sort(p);\n \n int sum = 0;\n for(int i=0; i<k; i++) {\n sum += p[i];\n }\n \n System.out.println(sum);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
int k = Integer.parseInt(sc.next());
int[] p = new int[n];
for(int i=0; i<n; i++) {
p[i] = Integer.parseInt(sc.next());
}
Arrays.sort(p);
int sum = 0;
for(int i=0; i<k; i++) {
sum += p[i];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
42,
2,
13,
13,
30,
4,
18,
13,
4,
18,
13,
40,
13,
4,
18,
13,
4,
18,
13,
13,
0,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
89,
14
],
[
89,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
17,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
17,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
17,
35
],
[
35,
36
],
[
35,
37
],
[
17,
38
],
[
38,
39
],
[
38,
40
],
[
17,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
45,
52
],
[
52,
53
],
[
17,
54
],
[
54,
55
],
[
55,
56
],
[
17,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
17,
61
],
[
61,
62
],
[
61,
63
],
[
17,
64
],
[
64,
65
],
[
64,
66
],
[
17,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
71,
78
],
[
78,
79
],
[
17,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
15,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.util.Scanner;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Collections;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int k, n;\n n = sc.nextInt();\n k = sc.nextInt();\n int i = 0;\n List<Integer> list = new ArrayList<>();\n while(i < n){\n list.add(sc.nextInt());\n i++;\n }\n sc.close();\n Collections.sort(list);\n i = 0;\n int sum = 0;\n while(i < k){\n sum += list.get(i);\n i++;\n }\n System.out.println(sum);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int k, n;\n n = sc.nextInt();\n k = sc.nextInt();\n int i = 0;\n List<Integer> list = new ArrayList<>();\n while(i < n){\n list.add(sc.nextInt());\n i++;\n }\n sc.close();\n Collections.sort(list);\n i = 0;\n int sum = 0;\n while(i < k){\n sum += list.get(i);\n i++;\n }\n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int k, n;\n n = sc.nextInt();\n k = sc.nextInt();\n int i = 0;\n List<Integer> list = new ArrayList<>();\n while(i < n){\n list.add(sc.nextInt());\n i++;\n }\n sc.close();\n Collections.sort(list);\n i = 0;\n int sum = 0;\n while(i < k){\n sum += list.get(i);\n i++;\n }\n System.out.println(sum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int k, n;\n n = sc.nextInt();\n k = sc.nextInt();\n int i = 0;\n List<Integer> list = new ArrayList<>();\n while(i < n){\n list.add(sc.nextInt());\n i++;\n }\n sc.close();\n Collections.sort(list);\n i = 0;\n int sum = 0;\n while(i < k){\n sum += list.get(i);\n i++;\n }\n System.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int k",
"k",
"n;",
"n",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt()",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int i = 0;",
"i",
"0",
"List<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"while(i < n){\n list.add(sc.nextInt());\n i++;\n }",
"i < n",
"i",
"n",
"{\n list.add(sc.nextInt());\n i++;\n }",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"i++",
"i",
"sc.close()",
"sc.close",
"sc",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"i = 0",
"i",
"0",
"int sum = 0;",
"sum",
"0",
"while(i < k){\n sum += list.get(i);\n i++;\n }",
"i < k",
"i",
"k",
"{\n sum += list.get(i);\n i++;\n }",
"sum += list.get(i)",
"sum",
"list.get(i)",
"list.get",
"list",
"i",
"i++",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int k, n;\n n = sc.nextInt();\n k = sc.nextInt();\n int i = 0;\n List<Integer> list = new ArrayList<>();\n while(i < n){\n list.add(sc.nextInt());\n i++;\n }\n sc.close();\n Collections.sort(list);\n i = 0;\n int sum = 0;\n while(i < k){\n sum += list.get(i);\n i++;\n }\n System.out.println(sum);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int k, n;\n n = sc.nextInt();\n k = sc.nextInt();\n int i = 0;\n List<Integer> list = new ArrayList<>();\n while(i < n){\n list.add(sc.nextInt());\n i++;\n }\n sc.close();\n Collections.sort(list);\n i = 0;\n int sum = 0;\n while(i < k){\n sum += list.get(i);\n i++;\n }\n System.out.println(sum);\n }\n}",
"Main"
]
| import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int k, n;
n = sc.nextInt();
k = sc.nextInt();
int i = 0;
List<Integer> list = new ArrayList<>();
while(i < n){
list.add(sc.nextInt());
i++;
}
sc.close();
Collections.sort(list);
i = 0;
int sum = 0;
while(i < k){
sum += list.get(i);
i++;
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
85,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
11,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
9,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint P[] = new int[n];\n\t\tint a = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}\n\t\tArrays.sort(P);\n\t\tfor(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}\n\t\tSystem.out.println(a);\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint P[] = new int[n];\n\t\tint a = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}\n\t\tArrays.sort(P);\n\t\tfor(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}\n\t\tSystem.out.println(a);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint P[] = new int[n];\n\t\tint a = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}\n\t\tArrays.sort(P);\n\t\tfor(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}\n\t\tSystem.out.println(a);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint P[] = new int[n];\n\t\tint a = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}\n\t\tArrays.sort(P);\n\t\tfor(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}\n\t\tSystem.out.println(a);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int P[] = new int[n];",
"P",
"new int[n]",
"n",
"int a = 0;",
"a",
"0",
"for(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tP[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tP[i] = scan.nextInt();\n\t\t}",
"P[i] = scan.nextInt()",
"P[i]",
"P",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"Arrays.sort(P)",
"Arrays.sort",
"Arrays",
"P",
"for(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\ta = a + P[i];\n\t\t}",
"{\n\t\t\ta = a + P[i];\n\t\t}",
"a = a + P[i]",
"a",
"a + P[i]",
"a",
"P[i]",
"P",
"i",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint P[] = new int[n];\n\t\tint a = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}\n\t\tArrays.sort(P);\n\t\tfor(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}\n\t\tSystem.out.println(a);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint P[] = new int[n];\n\t\tint a = 0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tP[i] = scan.nextInt();\n\t\t}\n\t\tArrays.sort(P);\n\t\tfor(int i=0; i<K; i++) {\n\t\t\ta = a + P[i];\n\t\t}\n\t\tSystem.out.println(a);\n\t}\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int K = scan.nextInt();
int P[] = new int[n];
int a = 0;
for(int i=0; i<n; i++) {
P[i] = scan.nextInt();
}
Arrays.sort(P);
for(int i=0; i<K; i++) {
a = a + P[i];
}
System.out.println(a);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }\n Arrays.sort(a);\n long ans = 0L;\n for (int i = 0; i < k; i++) {\n ans += a[i];\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }\n Arrays.sort(a);\n long ans = 0L;\n for (int i = 0; i < k; i++) {\n ans += a[i];\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }\n Arrays.sort(a);\n long ans = 0L;\n for (int i = 0; i < k; i++) {\n ans += a[i];\n }\n System.out.println(ans);\n sc.close();\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }\n Arrays.sort(a);\n long ans = 0L;\n for (int i = 0; i < k; i++) {\n ans += a[i];\n }\n System.out.println(ans);\n sc.close();\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n }",
"{\n a[i] = sc.nextInt();\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"long ans = 0L;",
"ans",
"0L",
"for (int i = 0; i < k; i++) {\n ans += a[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans += a[i];\n }",
"{\n ans += a[i];\n }",
"ans += a[i]",
"ans",
"a[i]",
"a",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }\n Arrays.sort(a);\n long ans = 0L;\n for (int i = 0; i < k; i++) {\n ans += a[i];\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n }\n Arrays.sort(a);\n long ans = 0L;\n for (int i = 0; i < k; i++) {\n ans += a[i];\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
Arrays.sort(a);
long ans = 0L;
for (int i = 0; i < k; i++) {
ans += a[i];
}
System.out.println(ans);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
117,
8
],
[
117,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
20,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
28,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
39,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
11,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
11,
83
],
[
83,
84
],
[
83,
85
],
[
11,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
11,
108
],
[
108,
109
],
[
109,
110
],
[
11,
111
],
[
111,
112
],
[
112,
113
],
[
9,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n String[] strNum = br.readLine().split(\" \");\n String[] strPrice = br.readLine().split(\" \");\n int n = Integer.parseInt(strNum[0]);\n int k = Integer.parseInt(strNum[1]);\n Integer[] price = new Integer[n];\n \n for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }\n \n Arrays.sort(price);\n \n int sum = 0;\n \n for(int i = 0; i < k; i++){\n sum += price[i];\n }\n \n out.println(sum);\n \n out.flush();\n out.close();\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n String[] strNum = br.readLine().split(\" \");\n String[] strPrice = br.readLine().split(\" \");\n int n = Integer.parseInt(strNum[0]);\n int k = Integer.parseInt(strNum[1]);\n Integer[] price = new Integer[n];\n \n for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }\n \n Arrays.sort(price);\n \n int sum = 0;\n \n for(int i = 0; i < k; i++){\n sum += price[i];\n }\n \n out.println(sum);\n \n out.flush();\n out.close();\n \n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n String[] strNum = br.readLine().split(\" \");\n String[] strPrice = br.readLine().split(\" \");\n int n = Integer.parseInt(strNum[0]);\n int k = Integer.parseInt(strNum[1]);\n Integer[] price = new Integer[n];\n \n for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }\n \n Arrays.sort(price);\n \n int sum = 0;\n \n for(int i = 0; i < k; i++){\n sum += price[i];\n }\n \n out.println(sum);\n \n out.flush();\n out.close();\n \n }",
"main",
"{\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n String[] strNum = br.readLine().split(\" \");\n String[] strPrice = br.readLine().split(\" \");\n int n = Integer.parseInt(strNum[0]);\n int k = Integer.parseInt(strNum[1]);\n Integer[] price = new Integer[n];\n \n for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }\n \n Arrays.sort(price);\n \n int sum = 0;\n \n for(int i = 0; i < k; i++){\n sum += price[i];\n }\n \n out.println(sum);\n \n out.flush();\n out.close();\n \n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"String[] strNum = br.readLine().split(\" \");",
"strNum",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"String[] strPrice = br.readLine().split(\" \");",
"strPrice",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int n = Integer.parseInt(strNum[0]);",
"n",
"Integer.parseInt(strNum[0])",
"Integer.parseInt",
"Integer",
"strNum[0]",
"strNum",
"0",
"int k = Integer.parseInt(strNum[1]);",
"k",
"Integer.parseInt(strNum[1])",
"Integer.parseInt",
"Integer",
"strNum[1]",
"strNum",
"1",
"Integer[] price = new Integer[n];",
"price",
"new Integer[n]",
"n",
"for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < price.length",
"i",
"price.length",
"price",
"price.length",
"i++",
"i++",
"i",
"{\n price[i] = Integer.valueOf(strPrice[i]);\n }",
"{\n price[i] = Integer.valueOf(strPrice[i]);\n }",
"price[i] = Integer.valueOf(strPrice[i])",
"price[i]",
"price",
"i",
"Integer.valueOf(strPrice[i])",
"Integer.valueOf",
"Integer",
"strPrice[i]",
"strPrice",
"i",
"Arrays.sort(price)",
"Arrays.sort",
"Arrays",
"price",
"int sum = 0;",
"sum",
"0",
"for(int i = 0; i < k; i++){\n sum += price[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n sum += price[i];\n }",
"{\n sum += price[i];\n }",
"sum += price[i]",
"sum",
"price[i]",
"price",
"i",
"out.println(sum)",
"out.println",
"out",
"sum",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n String[] strNum = br.readLine().split(\" \");\n String[] strPrice = br.readLine().split(\" \");\n int n = Integer.parseInt(strNum[0]);\n int k = Integer.parseInt(strNum[1]);\n Integer[] price = new Integer[n];\n \n for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }\n \n Arrays.sort(price);\n \n int sum = 0;\n \n for(int i = 0; i < k; i++){\n sum += price[i];\n }\n \n out.println(sum);\n \n out.flush();\n out.close();\n \n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n String[] strNum = br.readLine().split(\" \");\n String[] strPrice = br.readLine().split(\" \");\n int n = Integer.parseInt(strNum[0]);\n int k = Integer.parseInt(strNum[1]);\n Integer[] price = new Integer[n];\n \n for(int i = 0; i < price.length; i++){\n price[i] = Integer.valueOf(strPrice[i]);\n }\n \n Arrays.sort(price);\n \n int sum = 0;\n \n for(int i = 0; i < k; i++){\n sum += price[i];\n }\n \n out.println(sum);\n \n out.flush();\n out.close();\n \n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
String[] strNum = br.readLine().split(" ");
String[] strPrice = br.readLine().split(" ");
int n = Integer.parseInt(strNum[0]);
int k = Integer.parseInt(strNum[1]);
Integer[] price = new Integer[n];
for(int i = 0; i < price.length; i++){
price[i] = Integer.valueOf(strPrice[i]);
}
Arrays.sort(price);
int sum = 0;
for(int i = 0; i < k; i++){
sum += price[i];
}
out.println(sum);
out.flush();
out.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
18,
13,
17,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
29,
13,
23,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
14,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
14,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
48,
53
],
[
14,
54
],
[
54,
55
],
[
54,
56
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
14,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
88,
91
],
[
12,
92
],
[
92,
93
],
[
10,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
104,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
96,
122
],
[
122,
123
],
[
94,
124
],
[
124,
125
],
[
94,
126
],
[
126,
127
]
]
| [
"//package gfg;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\n class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n////\t\tint t=Integer.parseInt(br.readLine().trim());\n//\t\twhile(t-->0)\n//\t\t{\n\t\t\tString[] s1=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(s1[0].trim());\t\n\t\t\tint k=Integer.parseInt(s1[1].trim());\t\n\t\t\tString[] s=br.readLine().split(\" \");\n\t\t\tint[] a=new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(algo(a,k));\n\t\t\n//\t\t}\n\t}\n\n\tpublic static int algo(int[] a,int k) {\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\t\n\t\treturn sum;\n\t\t\n\t}\n\t\n\t\n\t\n}\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n////\t\tint t=Integer.parseInt(br.readLine().trim());\n//\t\twhile(t-->0)\n//\t\t{\n\t\t\tString[] s1=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(s1[0].trim());\t\n\t\t\tint k=Integer.parseInt(s1[1].trim());\t\n\t\t\tString[] s=br.readLine().split(\" \");\n\t\t\tint[] a=new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(algo(a,k));\n\t\t\n//\t\t}\n\t}\n\n\tpublic static int algo(int[] a,int k) {\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\t\n\t\treturn sum;\n\t\t\n\t}\n\t\n\t\n\t\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n////\t\tint t=Integer.parseInt(br.readLine().trim());\n//\t\twhile(t-->0)\n//\t\t{\n\t\t\tString[] s1=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(s1[0].trim());\t\n\t\t\tint k=Integer.parseInt(s1[1].trim());\t\n\t\t\tString[] s=br.readLine().split(\" \");\n\t\t\tint[] a=new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(algo(a,k));\n\t\t\n//\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n////\t\tint t=Integer.parseInt(br.readLine().trim());\n//\t\twhile(t-->0)\n//\t\t{\n\t\t\tString[] s1=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(s1[0].trim());\t\n\t\t\tint k=Integer.parseInt(s1[1].trim());\t\n\t\t\tString[] s=br.readLine().split(\" \");\n\t\t\tint[] a=new int[n];\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(algo(a,k));\n\t\t\n//\t\t}\n\t}",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String[] s1=br.readLine().split(\" \");",
"s1",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int n=Integer.parseInt(s1[0].trim());",
"n",
"Integer.parseInt(s1[0].trim())",
"Integer.parseInt",
"Integer",
"s1[0].trim()",
"s1[0].trim",
"s1[0]",
"s1",
"0",
"int k=Integer.parseInt(s1[1].trim());",
"k",
"Integer.parseInt(s1[1].trim())",
"Integer.parseInt",
"Integer",
"s1[1].trim()",
"s1[1].trim",
"s1[1]",
"s1",
"1",
"String[] s=br.readLine().split(\" \");",
"s",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}",
"{\n\t\t\t\ta[i]=Integer.parseInt(s[i].trim());\n\t\t\t}",
"a[i]=Integer.parseInt(s[i].trim())",
"a[i]",
"a",
"i",
"Integer.parseInt(s[i].trim())",
"Integer.parseInt",
"Integer",
"s[i].trim()",
"s[i].trim",
"s[i]",
"s",
"i",
"System.out.println(algo(a,k))",
"System.out.println",
"System.out",
"System",
"System.out",
"algo(a,k)",
"algo",
"a",
"k",
"String[] args",
"args",
"public static int algo(int[] a,int k) {\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\t\n\t\treturn sum;\n\t\t\n\t}",
"algo",
"{\n\t\tArrays.sort(a);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}\n\t\t\n\t\treturn sum;\n\t\t\n\t}",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;i++) {\n\t\t\tsum+=a[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tsum+=a[i];\n\t\t}",
"{\n\t\t\tsum+=a[i];\n\t\t}",
"sum+=a[i]",
"sum",
"a[i]",
"a",
"i",
"return sum;",
"sum",
"int[] a",
"a",
"int k",
"k"
]
| //package gfg;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
class Main {
public static void main(String[] args) throws Exception {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//// int t=Integer.parseInt(br.readLine().trim());
// while(t-->0)
// {
String[] s1=br.readLine().split(" ");
int n=Integer.parseInt(s1[0].trim());
int k=Integer.parseInt(s1[1].trim());
String[] s=br.readLine().split(" ");
int[] a=new int[n];
for(int i=0;i<n;i++)
{
a[i]=Integer.parseInt(s[i].trim());
}
System.out.println(algo(a,k));
// }
}
public static int algo(int[] a,int k) {
Arrays.sort(a);
int sum=0;
for(int i=0;i<k;i++) {
sum+=a[i];
}
return sum;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int ans = 0;\n for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }\n System.out.println(ans);\n }\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int ans = 0;\n for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }\n System.out.println(ans);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int ans = 0;\n for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }\n System.out.println(ans);\n }",
"main",
"{\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int ans = 0;\n for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }\n System.out.println(ans);\n }",
"@SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] p = new int[n];",
"p",
"new int[n]",
"n",
"for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n p[i] = sc.nextInt();\n }",
"{\n p[i] = sc.nextInt();\n }",
"p[i] = sc.nextInt()",
"p[i]",
"p",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int ans = 0;",
"ans",
"0",
"for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans += p[i];\n }",
"{\n ans += p[i];\n }",
"ans += p[i]",
"ans",
"p[i]",
"p",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int ans = 0;\n for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }\n System.out.println(ans);\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for (int i = 0 ; i < n ; i++) {\n p[i] = sc.nextInt();\n }\n Arrays.sort(p);\n int ans = 0;\n for (int i = 0 ; i < k ; i++) {\n ans += p[i];\n }\n System.out.println(ans);\n }\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] p = new int[n];
for (int i = 0 ; i < n ; i++) {
p[i] = sc.nextInt();
}
Arrays.sort(p);
int ans = 0;
for (int i = 0 ; i < k ; i++) {
ans += p[i];
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
91,
8
],
[
91,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
11,
56
],
[
56,
57
],
[
56,
58
],
[
11,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
11,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
11,
85
],
[
85,
86
],
[
86,
87
],
[
9,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
]
| [
"\nimport java.util.Arrays;\nimport java.util.Scanner;\n\n\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n \n int N=s.nextInt();\n int k=s.nextInt();\n \n int[] arr=new int[N];\n \n for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }\n Arrays.sort(arr);\n int p=0;\n for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }\n System.out.println(p);\n \n s.close();\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n \n int N=s.nextInt();\n int k=s.nextInt();\n \n int[] arr=new int[N];\n \n for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }\n Arrays.sort(arr);\n int p=0;\n for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }\n System.out.println(p);\n \n s.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n \n int N=s.nextInt();\n int k=s.nextInt();\n \n int[] arr=new int[N];\n \n for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }\n Arrays.sort(arr);\n int p=0;\n for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }\n System.out.println(p);\n \n s.close();\n }",
"main",
"{\n Scanner s=new Scanner(System.in);\n \n int N=s.nextInt();\n int k=s.nextInt();\n \n int[] arr=new int[N];\n \n for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }\n Arrays.sort(arr);\n int p=0;\n for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }\n System.out.println(p);\n \n s.close();\n }",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int N=s.nextInt();",
"N",
"s.nextInt()",
"s.nextInt",
"s",
"int k=s.nextInt();",
"k",
"s.nextInt()",
"s.nextInt",
"s",
"int[] arr=new int[N];",
"arr",
"new int[N]",
"N",
"for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \tint x=s.nextInt();\n \tarr[i]=x;\n }",
"{\n \tint x=s.nextInt();\n \tarr[i]=x;\n }",
"int x=s.nextInt();",
"x",
"s.nextInt()",
"s.nextInt",
"s",
"arr[i]=x",
"arr[i]",
"arr",
"i",
"x",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int p=0;",
"p",
"0",
"for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \tp=p+arr[i];\n }",
"{\n \tp=p+arr[i];\n }",
"p=p+arr[i]",
"p",
"p+arr[i]",
"p",
"arr[i]",
"arr",
"i",
"System.out.println(p)",
"System.out.println",
"System.out",
"System",
"System.out",
"p",
"s.close()",
"s.close",
"s",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n \n int N=s.nextInt();\n int k=s.nextInt();\n \n int[] arr=new int[N];\n \n for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }\n Arrays.sort(arr);\n int p=0;\n for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }\n System.out.println(p);\n \n s.close();\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\n \n int N=s.nextInt();\n int k=s.nextInt();\n \n int[] arr=new int[N];\n \n for(int i=0;i<N;i++) {\n \tint x=s.nextInt();\n \tarr[i]=x;\n }\n Arrays.sort(arr);\n int p=0;\n for(int i=0;i<k;i++) {\n \tp=p+arr[i];\n }\n System.out.println(p);\n \n s.close();\n }\n}",
"Main"
]
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int N=s.nextInt();
int k=s.nextInt();
int[] arr=new int[N];
for(int i=0;i<N;i++) {
int x=s.nextInt();
arr[i]=x;
}
Arrays.sort(arr);
int p=0;
for(int i=0;i<k;i++) {
p=p+arr[i];
}
System.out.println(p);
s.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
113,
8
],
[
113,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
20,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
39,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
44,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
11,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
11,
80
],
[
80,
81
],
[
80,
82
],
[
11,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
83,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
11,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
11,
107
],
[
107,
108
],
[
108,
109
],
[
9,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main\n{\n public static void main(String ars[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int n=Integer.parseInt(str[0]);\n int k=Integer.parseInt(str[1]);\n str=br.readLine().split(\" \");\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);\n Arrays.sort(arr);\n int sum=0;\n for(int i=0;i<k;i++)\n sum+=arr[i];\n pw.println(sum);\n pw.flush();\n pw.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n public static void main(String ars[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int n=Integer.parseInt(str[0]);\n int k=Integer.parseInt(str[1]);\n str=br.readLine().split(\" \");\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);\n Arrays.sort(arr);\n int sum=0;\n for(int i=0;i<k;i++)\n sum+=arr[i];\n pw.println(sum);\n pw.flush();\n pw.close();\n }\n}",
"Main",
"public static void main(String ars[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int n=Integer.parseInt(str[0]);\n int k=Integer.parseInt(str[1]);\n str=br.readLine().split(\" \");\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);\n Arrays.sort(arr);\n int sum=0;\n for(int i=0;i<k;i++)\n sum+=arr[i];\n pw.println(sum);\n pw.flush();\n pw.close();\n }",
"main",
"{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int n=Integer.parseInt(str[0]);\n int k=Integer.parseInt(str[1]);\n str=br.readLine().split(\" \");\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);\n Arrays.sort(arr);\n int sum=0;\n for(int i=0;i<k;i++)\n sum+=arr[i];\n pw.println(sum);\n pw.flush();\n pw.close();\n }",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter pw=new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"String str[]=br.readLine().split(\" \");",
"str",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int n=Integer.parseInt(str[0]);",
"n",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int k=Integer.parseInt(str[1]);",
"k",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"str=br.readLine().split(\" \")",
"str",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int arr[]=new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i]=Integer.parseInt(str[i]);",
"arr[i]=Integer.parseInt(str[i])",
"arr[i]",
"arr",
"i",
"Integer.parseInt(str[i])",
"Integer.parseInt",
"Integer",
"str[i]",
"str",
"i",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;i++)\n sum+=arr[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"sum+=arr[i];",
"sum+=arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"pw.println(sum)",
"pw.println",
"pw",
"sum",
"pw.flush()",
"pw.flush",
"pw",
"pw.close()",
"pw.close",
"pw",
"String ars[]",
"ars",
"public class Main\n{\n public static void main(String ars[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int n=Integer.parseInt(str[0]);\n int k=Integer.parseInt(str[1]);\n str=br.readLine().split(\" \");\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);\n Arrays.sort(arr);\n int sum=0;\n for(int i=0;i<k;i++)\n sum+=arr[i];\n pw.println(sum);\n pw.flush();\n pw.close();\n }\n}",
"public class Main\n{\n public static void main(String ars[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int n=Integer.parseInt(str[0]);\n int k=Integer.parseInt(str[1]);\n str=br.readLine().split(\" \");\n int arr[]=new int[n];\n for(int i=0;i<n;i++)\n arr[i]=Integer.parseInt(str[i]);\n Arrays.sort(arr);\n int sum=0;\n for(int i=0;i<k;i++)\n sum+=arr[i];\n pw.println(sum);\n pw.flush();\n pw.close();\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main
{
public static void main(String ars[])throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw=new PrintWriter(System.out);
String str[]=br.readLine().split(" ");
int n=Integer.parseInt(str[0]);
int k=Integer.parseInt(str[1]);
str=br.readLine().split(" ");
int arr[]=new int[n];
for(int i=0;i<n;i++)
arr[i]=Integer.parseInt(str[i]);
Arrays.sort(arr);
int sum=0;
for(int i=0;i<k;i++)
sum+=arr[i];
pw.println(sum);
pw.flush();
pw.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
42,
2,
17,
13,
30,
0,
13,
18,
13,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
13,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
4,
13,
4,
18,
13,
13,
4,
13,
4,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
18,
13,
2,
13,
17,
4,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
18,
13,
2,
13,
17,
4,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
3,
42,
2,
2,
13,
18,
13,
13,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
4,
18,
18,
13,
13,
2,
2,
13,
13,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
20,
17,
41,
13,
39,
17,
17,
17,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
35,
13,
34,
17,
1,
40,
18,
13,
17,
3,
34,
17,
1,
40,
18,
13,
17,
3,
34,
17,
1,
40,
18,
13,
17,
3,
34,
17,
1,
40,
18,
13,
17,
3,
41,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
2,
18,
13,
13,
17,
13,
40,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
4,
18,
4,
18,
4,
13,
4,
18,
13,
13,
17,
17,
17,
17,
11,
1,
41,
13,
17,
2,
13,
2,
17,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
2,
17,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
13,
17,
2,
2,
2,
13,
13,
17,
17,
2,
2,
2,
13,
13,
17,
17,
30,
40,
13,
14,
2,
13,
13,
40,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
826,
8
],
[
826,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
9,
14
],
[
14,
15
],
[
826,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
19,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
31,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
40,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
826,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
65,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
77,
95
],
[
95,
96
],
[
95,
97
],
[
77,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
99,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
77,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
77,
125
],
[
125,
126
],
[
125,
127
],
[
77,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
132,
140
],
[
140,
141
],
[
77,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
826,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
160,
161
],
[
160,
162
],
[
151,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
163,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
174,
179
],
[
180,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
182,
185
],
[
182,
186
],
[
180,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
187,
191
],
[
826,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
199,
204
],
[
204,
205
],
[
204,
206
],
[
195,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
207,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
219,
220
],
[
207,
221
],
[
221,
222
],
[
221,
223
],
[
207,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
224,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
224,
234
],
[
234,
235
],
[
235,
236
],
[
224,
237
],
[
238,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
246,
247
],
[
245,
248
],
[
241,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
252,
253
],
[
251,
254
],
[
239,
255
],
[
255,
256
],
[
256,
257
],
[
207,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
258,
263
],
[
826,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
268,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
281,
283
],
[
283,
284
],
[
284,
285
],
[
268,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
291,
292
],
[
268,
293
],
[
293,
294
],
[
293,
295
],
[
296,
297
],
[
296,
298
],
[
268,
299
],
[
299,
300
],
[
299,
301
],
[
302,
303
],
[
302,
304
],
[
268,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
268,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
310,
314
],
[
268,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
317,
319
],
[
315,
320
],
[
320,
321
],
[
320,
322
],
[
315,
323
],
[
323,
324
],
[
324,
325
],
[
315,
326
],
[
327,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
335,
337
],
[
332,
338
],
[
338,
339
],
[
338,
340
],
[
340,
341
],
[
341,
342
],
[
268,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
343,
348
],
[
348,
349
],
[
348,
350
],
[
343,
351
],
[
351,
352
],
[
352,
353
],
[
343,
354
],
[
355,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
356,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
363,
364
],
[
363,
365
],
[
360,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
369,
370
],
[
268,
371
],
[
371,
372
],
[
371,
373
],
[
268,
374
],
[
374,
375
],
[
375,
376
],
[
376,
377
],
[
376,
378
],
[
374,
379
],
[
379,
380
],
[
379,
381
],
[
374,
382
],
[
382,
383
],
[
383,
384
],
[
374,
385
],
[
386,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
390,
392
],
[
387,
393
],
[
393,
394
],
[
386,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
399,
401
],
[
396,
402
],
[
402,
403
],
[
402,
404
],
[
395,
405
],
[
405,
406
],
[
386,
407
],
[
407,
408
],
[
407,
409
],
[
409,
410
],
[
410,
411
],
[
409,
412
],
[
409,
413
],
[
413,
414
],
[
413,
415
],
[
268,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
418,
420
],
[
416,
421
],
[
826,
422
],
[
422,
423
],
[
422,
424
],
[
424,
425
],
[
425,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
429,
434
],
[
434,
435
],
[
434,
436
],
[
425,
437
],
[
437,
438
],
[
438,
439
],
[
438,
440
],
[
437,
441
],
[
441,
442
],
[
441,
443
],
[
443,
444
],
[
443,
445
],
[
445,
446
],
[
446,
447
],
[
437,
448
],
[
448,
449
],
[
448,
450
],
[
437,
451
],
[
451,
452
],
[
451,
453
],
[
437,
454
],
[
454,
455
],
[
455,
456
],
[
456,
457
],
[
456,
458
],
[
454,
459
],
[
459,
460
],
[
460,
461
],
[
460,
462
],
[
459,
463
],
[
826,
464
],
[
464,
465
],
[
464,
466
],
[
466,
467
],
[
467,
468
],
[
468,
469
],
[
468,
470
],
[
470,
471
],
[
471,
472
],
[
472,
473
],
[
473,
474
],
[
473,
475
],
[
471,
476
],
[
476,
477
],
[
476,
478
],
[
467,
479
],
[
479,
480
],
[
480,
481
],
[
480,
482
],
[
479,
483
],
[
483,
484
],
[
483,
485
],
[
485,
486
],
[
485,
487
],
[
487,
488
],
[
488,
489
],
[
479,
490
],
[
490,
491
],
[
490,
492
],
[
479,
494
],
[
494,
495
],
[
494,
496
],
[
496,
497
],
[
496,
498
],
[
496,
499
],
[
496,
500
],
[
479,
501
],
[
501,
502
],
[
502,
503
],
[
501,
504
],
[
501,
505
],
[
479,
506
],
[
506,
507
],
[
507,
508
],
[
508,
509
],
[
508,
510
],
[
506,
511
],
[
511,
512
],
[
511,
513
],
[
506,
514
],
[
514,
515
],
[
515,
516
],
[
506,
517
],
[
518,
518
],
[
518,
519
],
[
519,
520
],
[
519,
521
],
[
521,
522
],
[
522,
523
],
[
518,
524
],
[
524,
525
],
[
524,
526
],
[
526,
527
],
[
526,
528
],
[
528,
529
],
[
529,
530
],
[
530,
531
],
[
530,
532
],
[
528,
533
],
[
524,
534
],
[
534,
535
],
[
534,
536
],
[
536,
537
],
[
537,
538
],
[
538,
539
],
[
538,
540
],
[
536,
541
],
[
524,
542
],
[
542,
543
],
[
542,
544
],
[
544,
545
],
[
545,
546
],
[
546,
547
],
[
546,
548
],
[
544,
549
],
[
524,
550
],
[
550,
551
],
[
550,
552
],
[
552,
553
],
[
553,
554
],
[
554,
555
],
[
554,
556
],
[
552,
557
],
[
479,
558
],
[
558,
559
],
[
558,
560
],
[
479,
561
],
[
561,
562
],
[
561,
563
],
[
561,
564
],
[
565,
565
],
[
565,
566
],
[
566,
567
],
[
567,
568
],
[
568,
569
],
[
568,
570
],
[
566,
571
],
[
572,
572
],
[
572,
573
],
[
573,
574
],
[
573,
575
],
[
572,
576
],
[
572,
577
],
[
565,
578
],
[
578,
579
],
[
826,
580
],
[
580,
581
],
[
580,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
584,
586
],
[
586,
587
],
[
587,
588
],
[
588,
589
],
[
589,
590
],
[
589,
591
],
[
587,
592
],
[
592,
593
],
[
592,
594
],
[
583,
595
],
[
595,
596
],
[
596,
597
],
[
596,
598
],
[
595,
599
],
[
599,
600
],
[
599,
601
],
[
601,
602
],
[
601,
603
],
[
603,
604
],
[
604,
605
],
[
595,
606
],
[
606,
607
],
[
606,
608
],
[
608,
609
],
[
608,
610
],
[
610,
611
],
[
611,
612
],
[
595,
613
],
[
613,
614
],
[
613,
615
],
[
615,
616
],
[
615,
617
],
[
617,
618
],
[
618,
619
],
[
595,
620
],
[
620,
621
],
[
620,
622
],
[
595,
623
],
[
623,
624
],
[
623,
625
],
[
595,
626
],
[
626,
627
],
[
626,
628
],
[
595,
631
],
[
631,
632
],
[
631,
633
],
[
595,
634
],
[
634,
635
],
[
635,
636
],
[
636,
637
],
[
636,
638
],
[
634,
639
],
[
639,
640
],
[
639,
641
],
[
634,
642
],
[
642,
643
],
[
643,
644
],
[
634,
645
],
[
646,
646
],
[
646,
647
],
[
647,
648
],
[
647,
649
],
[
649,
650
],
[
650,
651
],
[
646,
652
],
[
652,
653
],
[
653,
654
],
[
654,
655
],
[
654,
656
],
[
652,
657
],
[
657,
658
],
[
657,
659
],
[
652,
660
],
[
660,
661
],
[
661,
662
],
[
652,
663
],
[
664,
664
],
[
664,
665
],
[
665,
666
],
[
666,
667
],
[
667,
668
],
[
667,
669
],
[
666,
670
],
[
665,
671
],
[
671,
672
],
[
671,
673
],
[
673,
674
],
[
674,
675
],
[
675,
676
],
[
676,
677
],
[
677,
678
],
[
677,
679
],
[
679,
680
],
[
680,
681
],
[
679,
682
],
[
675,
683
],
[
675,
684
],
[
673,
685
],
[
673,
686
],
[
595,
687
],
[
687,
688
],
[
688,
689
],
[
689,
690
],
[
689,
691
],
[
687,
692
],
[
692,
693
],
[
692,
694
],
[
694,
695
],
[
694,
696
],
[
687,
697
],
[
697,
698
],
[
698,
699
],
[
687,
700
],
[
701,
701
],
[
701,
702
],
[
702,
703
],
[
703,
704
],
[
704,
705
],
[
704,
706
],
[
702,
707
],
[
707,
708
],
[
707,
709
],
[
709,
710
],
[
709,
711
],
[
702,
712
],
[
712,
713
],
[
713,
714
],
[
702,
715
],
[
716,
716
],
[
716,
717
],
[
717,
718
],
[
718,
719
],
[
719,
720
],
[
719,
721
],
[
717,
722
],
[
722,
723
],
[
722,
724
],
[
717,
725
],
[
725,
726
],
[
726,
727
],
[
717,
728
],
[
729,
729
],
[
729,
730
],
[
730,
731
],
[
731,
732
],
[
732,
733
],
[
732,
734
],
[
730,
735
],
[
735,
736
],
[
735,
737
],
[
730,
738
],
[
738,
739
],
[
739,
740
],
[
730,
741
],
[
742,
742
],
[
742,
743
],
[
743,
744
],
[
745,
745
],
[
745,
746
],
[
746,
747
],
[
747,
748
],
[
748,
749
],
[
748,
750
],
[
747,
751
],
[
746,
752
],
[
745,
753
],
[
753,
754
],
[
754,
755
],
[
755,
756
],
[
755,
757
],
[
754,
758
],
[
753,
759
],
[
745,
760
],
[
760,
761
],
[
761,
762
],
[
762,
763
],
[
762,
764
],
[
761,
765
],
[
760,
766
],
[
743,
767
],
[
767,
768
],
[
768,
769
],
[
716,
770
],
[
770,
771
],
[
771,
772
],
[
771,
773
],
[
770,
774
],
[
774,
775
],
[
716,
776
],
[
776,
777
],
[
776,
778
],
[
595,
779
],
[
779,
780
],
[
780,
781
],
[
781,
782
],
[
781,
783
],
[
779,
784
],
[
826,
785
],
[
785,
786
],
[
785,
787
],
[
787,
788
],
[
788,
789
],
[
789,
790
],
[
790,
791
],
[
789,
792
],
[
785,
793
],
[
793,
794
],
[
826,
795
],
[
795,
796
],
[
795,
797
],
[
797,
798
],
[
798,
799
],
[
799,
800
],
[
800,
801
],
[
799,
802
],
[
795,
803
],
[
803,
804
],
[
826,
805
],
[
805,
806
],
[
805,
807
],
[
807,
808
],
[
808,
809
],
[
809,
810
],
[
810,
811
],
[
809,
812
],
[
805,
813
],
[
813,
814
],
[
826,
815
],
[
815,
816
],
[
815,
817
],
[
817,
818
],
[
818,
819
],
[
819,
820
],
[
820,
821
],
[
819,
822
],
[
815,
823
],
[
823,
824
],
[
0,
825
],
[
825,
826
],
[
825,
827
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n // abc171_a();\n abc171_b();\n // abc172_a();\n // abc172_b();\n // abc172_c();\n // abc173_a();\n // abc173_b();\n // abc173_c();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc171_a() {\n try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc171_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_b() {\n try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }\n }\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n\n public static long parseL(String value) {\n return Long.parseLong(value);\n }\n\n public static double parseD(String value) {\n return Double.parseDouble(value);\n }\n\n public static <T> String parseS(T value) {\n return String.valueOf(value);\n }\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n // abc171_a();\n abc171_b();\n // abc172_a();\n // abc172_b();\n // abc172_c();\n // abc173_a();\n // abc173_b();\n // abc173_c();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc171_a() {\n try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc171_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_b() {\n try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }\n }\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n\n public static long parseL(String value) {\n return Long.parseLong(value);\n }\n\n public static double parseD(String value) {\n return Double.parseDouble(value);\n }\n\n public static <T> String parseS(T value) {\n return String.valueOf(value);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n // abc171_a();\n abc171_b();\n // abc172_a();\n // abc172_b();\n // abc172_c();\n // abc173_a();\n // abc173_b();\n // abc173_c();\n }",
"main",
"{\n // abc171_a();\n abc171_b();\n // abc172_a();\n // abc172_b();\n // abc172_c();\n // abc173_a();\n // abc173_b();\n // abc173_c();\n }",
"abc171_b()",
"abc171_b",
"String[] args",
"args",
"public static void abc171_a() {\n try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc171_a",
"{\n try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"String a = sc.next();",
"a",
"sc.next()",
"sc.next",
"sc",
"if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }",
"Character.isUpperCase(a.charAt(0))",
"Character.isUpperCase",
"Character",
"a.charAt(0)",
"a.charAt",
"a",
"0",
"{\n System.out.println(\"A\");\n }",
"System.out.println(\"A\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"A\"",
"{\n System.out.println(\"a\");\n }",
"System.out.println(\"a\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"a\"",
"public static void abc171_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc171_b",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int n = parseI(sc.next());",
"n",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int k = parseI(sc.next());",
"k",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int[] prices = new int[n];",
"prices",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n prices[i] = parseI(sc.next());\n }",
"{\n prices[i] = parseI(sc.next());\n }",
"prices[i] = parseI(sc.next())",
"prices[i]",
"prices",
"i",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"Arrays.sort(prices)",
"Arrays.sort",
"Arrays",
"prices",
"int ans = 0;",
"ans",
"0",
"while (0 < k) {\n ans += prices[k - 1];\n k--;\n }",
"0 < k",
"0",
"k",
"{\n ans += prices[k - 1];\n k--;\n }",
"ans += prices[k - 1]",
"ans",
"prices[k - 1]",
"prices",
"k - 1",
"k",
"1",
"k--",
"k",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public static void abc172_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc172_a",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int a = parseI(sc.next());",
"a",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3))",
"System.out.println",
"System.out",
"System",
"System.out",
"a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3)",
"a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3)",
"a",
"(int) Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"(int) Math.pow(a, 3)",
"Math.pow",
"Math",
"a",
"3",
"public static void abc172_b() {\n try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc172_b",
"{\n try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int ansCnt = 0;",
"ansCnt",
"0",
"for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }",
"{\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }",
"if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }",
"!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))",
"parseS(s.charAt(i)).equals(parseS(t.charAt(i)))",
"parseS(s.charAt(i)).equals",
"parseS(s.charAt(i))",
"parseS",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"parseS(t.charAt(i))",
"parseS",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"{\n ansCnt++;\n }",
"ansCnt++",
"ansCnt",
"System.out.println(ansCnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"ansCnt",
"public static void abc172_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }\n }",
"abc172_c",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }",
"{\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int n = parseI(sc.next());",
"n",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int m = parseI(sc.next());",
"m",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int k = parseI(sc.next());",
"k",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"long[] nList = new long[n + 1];",
"nList",
"new long[n + 1]",
"n + 1",
"n",
"1",
"long[] mList = new long[m + 1];",
"mList",
"new long[m + 1]",
"m + 1",
"m",
"1",
"nList[0] = 0",
"nList[0]",
"nList",
"0",
"0",
"mList[0] = 0",
"mList[0]",
"mList",
"0",
"0",
"for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n nList[i] = nList[i - 1] + parseI(sc.next());\n }",
"{\n nList[i] = nList[i - 1] + parseI(sc.next());\n }",
"nList[i] = nList[i - 1] + parseI(sc.next())",
"nList[i]",
"nList",
"i",
"nList[i - 1] + parseI(sc.next())",
"nList[i - 1]",
"nList",
"i - 1",
"i",
"1",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= m",
"i",
"m",
"i++",
"i++",
"i",
"{\n mList[i] = mList[i - 1] + parseI(sc.next());\n }",
"{\n mList[i] = mList[i - 1] + parseI(sc.next());\n }",
"mList[i] = mList[i - 1] + parseI(sc.next())",
"mList[i]",
"mList",
"i",
"mList[i - 1] + parseI(sc.next())",
"mList[i - 1]",
"mList",
"i - 1",
"i",
"1",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int ansCnt = 0;",
"ansCnt",
"0",
"for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }",
"{\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }",
"if (k < nList[i]) {\n break;\n }",
"k < nList[i]",
"k",
"nList[i]",
"nList",
"i",
"{\n break;\n }",
"break;",
"while (k - nList[i] < mList[m])\n m--;",
"k - nList[i] < mList[m]",
"k - nList[i]",
"k",
"nList[i]",
"nList",
"i",
"mList[m]",
"mList",
"m",
"m--",
"m",
"ansCnt = Math.max(ansCnt, i + m)",
"ansCnt",
"Math.max(ansCnt, i + m)",
"Math.max",
"Math",
"ansCnt",
"i + m",
"i",
"m",
"System.out.println(ansCnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"ansCnt",
"public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc173_a",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int payment = parseI(sc.next());",
"payment",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int max = 10000;",
"max",
"10000",
"int thou = 1000;",
"thou",
"1000",
"System.out.println((max - payment) % thou)",
"System.out.println",
"System.out",
"System",
"System.out",
"(max - payment) % thou",
"(max - payment)",
"max",
"payment",
"thou",
"public static void abc173_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc173_b",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int num = parseI(sc.next());",
"num",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int[] ansCount = new int[4];",
"ansCount",
"new int[4]",
"4",
"final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };",
"err",
"{ \"AC\", \"WA\", \"TLE\", \"RE\" }",
"\"AC\"",
"\"WA\"",
"\"TLE\"",
"\"RE\"",
"Arrays.fill(ansCount, 0)",
"Arrays.fill",
"Arrays",
"ansCount",
"0",
"for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num",
"i",
"num",
"i++",
"i++",
"i",
"{\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }",
"{\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }",
"String ans = sc.next();",
"ans",
"sc.next()",
"sc.next",
"sc",
"switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }",
"ans",
"case \"AC\":",
"\"AC\"",
"case \"AC\":",
"ansCount[0]++",
"ansCount[0]",
"ansCount",
"0",
"break;",
"case \"WA\":",
"\"WA\"",
"case \"WA\":",
"ansCount[1]++",
"ansCount[1]",
"ansCount",
"1",
"break;",
"case \"TLE\":",
"\"TLE\"",
"case \"TLE\":",
"ansCount[2]++",
"ansCount[2]",
"ansCount",
"2",
"break;",
"case \"RE\":",
"\"RE\"",
"case \"RE\":",
"ansCount[3]++",
"ansCount[3]",
"ansCount",
"3",
"break;",
"int count = 0;",
"count",
"0",
"for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }",
"int answer",
"ansCount",
"{\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }",
"{\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }",
"System.out.println(err[count] + \" x \" + answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"err[count] + \" x \" + answer",
"err[count] + \" x \" + answer",
"err[count]",
"err",
"count",
"\" x \"",
"answer",
"count++",
"count",
"public static void abc173_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc173_c",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int row = parseI(sc.next());",
"row",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int column = parseI(sc.next());",
"column",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int checkBlackCount = parseI(sc.next());",
"checkBlackCount",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int existBlack = 0;",
"existBlack",
"0",
"int ansCount = 0;",
"ansCount",
"0",
"int[][] inputList = new int[row][column];",
"inputList",
"new int[row][column]",
"row",
"column",
"String input = \"\";",
"input",
"\"\"",
"for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < row",
"i",
"row",
"i++",
"i++",
"i",
"{\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }",
"{\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }",
"input = sc.next()",
"input",
"sc.next()",
"sc.next",
"sc",
"for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }",
"int x = 0;",
"int x = 0;",
"x",
"0",
"x < column",
"x",
"column",
"x++",
"x++",
"x",
"{\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }",
"{\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }",
"inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"))",
"inputList[i][x]",
"inputList[i]",
"inputList",
"i",
"x",
"parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"))",
"parseI",
"parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\")",
"parseS(input.charAt(x)).replace(\".\", \"0\").replace",
"parseS(input.charAt(x)).replace(\".\", \"0\")",
"parseS(input.charAt(x)).replace",
"parseS(input.charAt(x))",
"parseS",
"input.charAt(x)",
"input.charAt",
"input",
"x",
"\".\"",
"\"0\"",
"\"#\"",
"\"1\"",
"for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < (1 << row)",
"i",
"(1 << row)",
"1",
"row",
"i++",
"i++",
"i",
"{\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }",
"{\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }",
"for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }",
"int x = 0;",
"int x = 0;",
"x",
"0",
"x < (1 << column)",
"x",
"(1 << column)",
"1",
"column",
"x++",
"x++",
"x",
"{\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }",
"{\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }",
"for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }",
"int chRownum = 0;",
"int chRownum = 0;",
"chRownum",
"0",
"chRownum < row",
"chRownum",
"row",
"chRownum++",
"chRownum++",
"chRownum",
"{\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }",
"{\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }",
"for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }",
"int chColNum = 0;",
"int chColNum = 0;",
"chColNum",
"0",
"chColNum < column",
"chColNum",
"column",
"chColNum++",
"chColNum++",
"chColNum",
"{\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }",
"{\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }",
"if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }",
"inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0",
"inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0",
"inputList[chRownum][chColNum] == 1",
"inputList[chRownum][chColNum]",
"inputList[chRownum]",
"inputList",
"chRownum",
"chColNum",
"1",
"((i >> chRownum) & 1) == 0",
"((i >> chRownum) & 1)",
"(i >> chRownum)",
"i",
"chRownum",
"1",
"0",
"((x >> chColNum) & 1) == 0",
"((x >> chColNum) & 1)",
"(x >> chColNum)",
"x",
"chColNum",
"1",
"0",
"{\n existBlack++;\n }",
"existBlack++",
"existBlack",
"if (existBlack == checkBlackCount) ansCount++;",
"existBlack == checkBlackCount",
"existBlack",
"checkBlackCount",
"ansCount++",
"ansCount",
"existBlack = 0",
"existBlack",
"0",
"System.out.println(ansCount)",
"System.out.println",
"System.out",
"System",
"System.out",
"ansCount",
"public static int parseI(String value) {\n return Integer.parseInt(value);\n }",
"parseI",
"{\n return Integer.parseInt(value);\n }",
"return Integer.parseInt(value);",
"Integer.parseInt(value)",
"Integer.parseInt",
"Integer",
"value",
"String value",
"value",
"public static long parseL(String value) {\n return Long.parseLong(value);\n }",
"parseL",
"{\n return Long.parseLong(value);\n }",
"return Long.parseLong(value);",
"Long.parseLong(value)",
"Long.parseLong",
"Long",
"value",
"String value",
"value",
"public static double parseD(String value) {\n return Double.parseDouble(value);\n }",
"parseD",
"{\n return Double.parseDouble(value);\n }",
"return Double.parseDouble(value);",
"Double.parseDouble(value)",
"Double.parseDouble",
"Double",
"value",
"String value",
"value",
"public static <T> String parseS(T value) {\n return String.valueOf(value);\n }",
"parseS",
"{\n return String.valueOf(value);\n }",
"return String.valueOf(value);",
"String.valueOf(value)",
"String.valueOf",
"String",
"value",
"T value",
"value",
"public class Main {\n\n public static void main(String[] args) {\n // abc171_a();\n abc171_b();\n // abc172_a();\n // abc172_b();\n // abc172_c();\n // abc173_a();\n // abc173_b();\n // abc173_c();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc171_a() {\n try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc171_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_b() {\n try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }\n }\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n\n public static long parseL(String value) {\n return Long.parseLong(value);\n }\n\n public static double parseD(String value) {\n return Double.parseDouble(value);\n }\n\n public static <T> String parseS(T value) {\n return String.valueOf(value);\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n // abc171_a();\n abc171_b();\n // abc172_a();\n // abc172_b();\n // abc172_c();\n // abc173_a();\n // abc173_b();\n // abc173_c();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc171_a() {\n try (Scanner sc = new Scanner(System.in)) {\n String a = sc.next();\n if (Character.isUpperCase(a.charAt(0))) {\n System.out.println(\"A\");\n } else {\n System.out.println(\"a\");\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc171_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int k = parseI(sc.next());\n\n int[] prices = new int[n];\n for (int i = 0; i < n; i++) {\n prices[i] = parseI(sc.next());\n }\n Arrays.sort(prices);\n\n int ans = 0;\n while (0 < k) {\n ans += prices[k - 1];\n k--;\n }\n System.out.println(ans);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = parseI(sc.next());\n\n System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_b() {\n try (Scanner sc = new Scanner(System.in)) {\n String s = sc.next();\n String t = sc.next();\n int ansCnt = 0;\n for (int i = 0; i < s.length(); i++) {\n if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {\n ansCnt++;\n }\n }\n System.out.println(ansCnt);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc172_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int n = parseI(sc.next());\n int m = parseI(sc.next());\n int k = parseI(sc.next());\n long[] nList = new long[n + 1];\n long[] mList = new long[m + 1];\n nList[0] = 0;\n mList[0] = 0;\n for (int i = 1; i <= n; i++) {\n nList[i] = nList[i - 1] + parseI(sc.next());\n }\n for (int i = 1; i <= m; i++) {\n mList[i] = mList[i - 1] + parseI(sc.next());\n }\n int ansCnt = 0;\n for (int i = 0; i <= n; i++) {\n if (k < nList[i]) {\n break;\n }\n while (k - nList[i] < mList[m])\n m--;\n ansCnt = Math.max(ansCnt, i + m);\n }\n System.out.println(ansCnt);\n }\n }\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_b() {\n try (Scanner sc = new Scanner(System.in)) {\n int num = parseI(sc.next());\n\n // AC\n // WA\n // TLE\n // RE x 0\n int[] ansCount = new int[4];\n final String[] err = { \"AC\", \"WA\", \"TLE\", \"RE\" };\n Arrays.fill(ansCount, 0);\n\n for (int i = 0; i < num; i++) {\n String ans = sc.next();\n switch (ans) {\n case \"AC\":\n ansCount[0]++;\n break;\n case \"WA\":\n ansCount[1]++;\n break;\n case \"TLE\":\n ansCount[2]++;\n break;\n case \"RE\":\n ansCount[3]++;\n break;\n }\n }\n int count = 0;\n for (int answer : ansCount) {\n System.out.println(err[count] + \" x \" + answer);\n count++;\n }\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static void abc173_c() {\n try (Scanner sc = new Scanner(System.in)) {\n int row = parseI(sc.next());\n int column = parseI(sc.next());\n int checkBlackCount = parseI(sc.next());\n int existBlack = 0;\n int ansCount = 0;\n int[][] inputList = new int[row][column];\n String input = \"\";\n for (int i = 0; i < row; i++) {\n input = sc.next();\n for (int x = 0; x < column; x++) {\n inputList[i][x] =\n parseI(parseS(input.charAt(x)).replace(\".\", \"0\").replace(\"#\", \"1\"));\n }\n }\n\n for (int i = 0; i < (1 << row); i++) {\n for (int x = 0; x < (1 << column); x++) {\n\n for (int chRownum = 0; chRownum < row; chRownum++) {\n for (int chColNum = 0; chColNum < column; chColNum++) {\n if (inputList[chRownum][chColNum] == 1\n && ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {\n existBlack++;\n }\n }\n }\n if (existBlack == checkBlackCount) ansCount++;\n existBlack = 0;\n\n }\n }\n System.out.println(ansCount);\n\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n\n public static long parseL(String value) {\n return Long.parseLong(value);\n }\n\n public static double parseD(String value) {\n return Double.parseDouble(value);\n }\n\n public static <T> String parseS(T value) {\n return String.valueOf(value);\n }\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// abc171_a();
abc171_b();
// abc172_a();
// abc172_b();
// abc172_c();
// abc173_a();
// abc173_b();
// abc173_c();
}
// int 2147483648 [ 2 * 10(9)]
// long 9223372036854775808 [ 9 * 10(18)]
public static void abc171_a() {
try (Scanner sc = new Scanner(System.in)) {
String a = sc.next();
if (Character.isUpperCase(a.charAt(0))) {
System.out.println("A");
} else {
System.out.println("a");
}
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static void abc171_b() {
try (Scanner sc = new Scanner(System.in)) {
int n = parseI(sc.next());
int k = parseI(sc.next());
int[] prices = new int[n];
for (int i = 0; i < n; i++) {
prices[i] = parseI(sc.next());
}
Arrays.sort(prices);
int ans = 0;
while (0 < k) {
ans += prices[k - 1];
k--;
}
System.out.println(ans);
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static void abc172_a() {
try (Scanner sc = new Scanner(System.in)) {
int a = parseI(sc.next());
System.out.println(a + (int) Math.pow(a, 2) + (int) Math.pow(a, 3));
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static void abc172_b() {
try (Scanner sc = new Scanner(System.in)) {
String s = sc.next();
String t = sc.next();
int ansCnt = 0;
for (int i = 0; i < s.length(); i++) {
if (!parseS(s.charAt(i)).equals(parseS(t.charAt(i)))) {
ansCnt++;
}
}
System.out.println(ansCnt);
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static void abc172_c() {
try (Scanner sc = new Scanner(System.in)) {
int n = parseI(sc.next());
int m = parseI(sc.next());
int k = parseI(sc.next());
long[] nList = new long[n + 1];
long[] mList = new long[m + 1];
nList[0] = 0;
mList[0] = 0;
for (int i = 1; i <= n; i++) {
nList[i] = nList[i - 1] + parseI(sc.next());
}
for (int i = 1; i <= m; i++) {
mList[i] = mList[i - 1] + parseI(sc.next());
}
int ansCnt = 0;
for (int i = 0; i <= n; i++) {
if (k < nList[i]) {
break;
}
while (k - nList[i] < mList[m])
m--;
ansCnt = Math.max(ansCnt, i + m);
}
System.out.println(ansCnt);
}
}
public static void abc173_a() {
try (Scanner sc = new Scanner(System.in)) {
int payment = parseI(sc.next());
int max = 10000;
int thou = 1000;
System.out.println((max - payment) % thou);
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static void abc173_b() {
try (Scanner sc = new Scanner(System.in)) {
int num = parseI(sc.next());
// AC
// WA
// TLE
// RE x 0
int[] ansCount = new int[4];
final String[] err = { "AC", "WA", "TLE", "RE" };
Arrays.fill(ansCount, 0);
for (int i = 0; i < num; i++) {
String ans = sc.next();
switch (ans) {
case "AC":
ansCount[0]++;
break;
case "WA":
ansCount[1]++;
break;
case "TLE":
ansCount[2]++;
break;
case "RE":
ansCount[3]++;
break;
}
}
int count = 0;
for (int answer : ansCount) {
System.out.println(err[count] + " x " + answer);
count++;
}
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static void abc173_c() {
try (Scanner sc = new Scanner(System.in)) {
int row = parseI(sc.next());
int column = parseI(sc.next());
int checkBlackCount = parseI(sc.next());
int existBlack = 0;
int ansCount = 0;
int[][] inputList = new int[row][column];
String input = "";
for (int i = 0; i < row; i++) {
input = sc.next();
for (int x = 0; x < column; x++) {
inputList[i][x] =
parseI(parseS(input.charAt(x)).replace(".", "0").replace("#", "1"));
}
}
for (int i = 0; i < (1 << row); i++) {
for (int x = 0; x < (1 << column); x++) {
for (int chRownum = 0; chRownum < row; chRownum++) {
for (int chColNum = 0; chColNum < column; chColNum++) {
if (inputList[chRownum][chColNum] == 1
&& ((i >> chRownum) & 1) == 0 && ((x >> chColNum) & 1) == 0) {
existBlack++;
}
}
}
if (existBlack == checkBlackCount) ansCount++;
existBlack = 0;
}
}
System.out.println(ansCount);
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
public static int parseI(String value) {
return Integer.parseInt(value);
}
public static long parseL(String value) {
return Long.parseLong(value);
}
public static double parseD(String value) {
return Double.parseDouble(value);
}
public static <T> String parseS(T value) {
return String.valueOf(value);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> kudamono = new ArrayList<>();\n for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }\n\n int ans=0;\n Collections.sort(kudamono);\n for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> kudamono = new ArrayList<>();\n for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }\n\n int ans=0;\n Collections.sort(kudamono);\n for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> kudamono = new ArrayList<>();\n for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }\n\n int ans=0;\n Collections.sort(kudamono);\n for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> kudamono = new ArrayList<>();\n for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }\n\n int ans=0;\n Collections.sort(kudamono);\n for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> kudamono = new ArrayList<>();",
"kudamono",
"new ArrayList<>()",
"for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n kudamono.add(sc.nextInt());\n }",
"{\n kudamono.add(sc.nextInt());\n }",
"kudamono.add(sc.nextInt())",
"kudamono.add",
"kudamono",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans=0;",
"ans",
"0",
"Collections.sort(kudamono)",
"Collections.sort",
"Collections",
"kudamono",
"for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans += kudamono.get(i);\n }",
"{\n ans += kudamono.get(i);\n }",
"ans += kudamono.get(i)",
"ans",
"kudamono.get(i)",
"kudamono.get",
"kudamono",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> kudamono = new ArrayList<>();\n for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }\n\n int ans=0;\n Collections.sort(kudamono);\n for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> kudamono = new ArrayList<>();\n for (int i=1;i<=n;i++) {\n kudamono.add(sc.nextInt());\n }\n\n int ans=0;\n Collections.sort(kudamono);\n for (int i=0;i<k;i++) {\n ans += kudamono.get(i);\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
List<Integer> kudamono = new ArrayList<>();
for (int i=1;i<=n;i++) {
kudamono.add(sc.nextInt());
}
int ans=0;
Collections.sort(kudamono);
for (int i=0;i<k;i++) {
ans += kudamono.get(i);
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
114,
14
],
[
114,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
42,
44
],
[
17,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
47,
52
],
[
17,
53
],
[
53,
54
],
[
53,
55
],
[
17,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
17,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
17,
84
],
[
84,
85
],
[
84,
86
],
[
17,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
17,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
15,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n public static void main(String args[]) throws IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString numberArray[] = br.readLine().split(\" \");\n\tint N = Integer.parseInt(numberArray[0]);\n\tint K = Integer.parseInt(numberArray[1]);\n\n\tString inputArray[] = br.readLine().split(\" \");\n\tint priceArray[] = new int[N];\n\tfor (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}\n\n\tArrays.sort(priceArray);\n\tint result = 0;\n\tfor (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}\n\tSystem.out.println(result);\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n public static void main(String args[]) throws IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString numberArray[] = br.readLine().split(\" \");\n\tint N = Integer.parseInt(numberArray[0]);\n\tint K = Integer.parseInt(numberArray[1]);\n\n\tString inputArray[] = br.readLine().split(\" \");\n\tint priceArray[] = new int[N];\n\tfor (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}\n\n\tArrays.sort(priceArray);\n\tint result = 0;\n\tfor (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}\n\tSystem.out.println(result);\n }\n}",
"Main",
"public static void main(String args[]) throws IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString numberArray[] = br.readLine().split(\" \");\n\tint N = Integer.parseInt(numberArray[0]);\n\tint K = Integer.parseInt(numberArray[1]);\n\n\tString inputArray[] = br.readLine().split(\" \");\n\tint priceArray[] = new int[N];\n\tfor (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}\n\n\tArrays.sort(priceArray);\n\tint result = 0;\n\tfor (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}\n\tSystem.out.println(result);\n }",
"main",
"{\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString numberArray[] = br.readLine().split(\" \");\n\tint N = Integer.parseInt(numberArray[0]);\n\tint K = Integer.parseInt(numberArray[1]);\n\n\tString inputArray[] = br.readLine().split(\" \");\n\tint priceArray[] = new int[N];\n\tfor (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}\n\n\tArrays.sort(priceArray);\n\tint result = 0;\n\tfor (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}\n\tSystem.out.println(result);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String numberArray[] = br.readLine().split(\" \");",
"numberArray",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int N = Integer.parseInt(numberArray[0]);",
"N",
"Integer.parseInt(numberArray[0])",
"Integer.parseInt",
"Integer",
"numberArray[0]",
"numberArray",
"0",
"int K = Integer.parseInt(numberArray[1]);",
"K",
"Integer.parseInt(numberArray[1])",
"Integer.parseInt",
"Integer",
"numberArray[1]",
"numberArray",
"1",
"String inputArray[] = br.readLine().split(\" \");",
"inputArray",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int priceArray[] = new int[N];",
"priceArray",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}",
"{\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}",
"priceArray[i] = Integer.parseInt(inputArray[i])",
"priceArray[i]",
"priceArray",
"i",
"Integer.parseInt(inputArray[i])",
"Integer.parseInt",
"Integer",
"inputArray[i]",
"inputArray",
"i",
"Arrays.sort(priceArray)",
"Arrays.sort",
"Arrays",
"priceArray",
"int result = 0;",
"result",
"0",
"for (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < K",
"j",
"K",
"j++",
"j++",
"j",
"{\n\t result += priceArray[j];\n\t}",
"{\n\t result += priceArray[j];\n\t}",
"result += priceArray[j]",
"result",
"priceArray[j]",
"priceArray",
"j",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String args[]",
"args",
"public class Main {\n public static void main(String args[]) throws IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString numberArray[] = br.readLine().split(\" \");\n\tint N = Integer.parseInt(numberArray[0]);\n\tint K = Integer.parseInt(numberArray[1]);\n\n\tString inputArray[] = br.readLine().split(\" \");\n\tint priceArray[] = new int[N];\n\tfor (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}\n\n\tArrays.sort(priceArray);\n\tint result = 0;\n\tfor (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}\n\tSystem.out.println(result);\n }\n}",
"public class Main {\n public static void main(String args[]) throws IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString numberArray[] = br.readLine().split(\" \");\n\tint N = Integer.parseInt(numberArray[0]);\n\tint K = Integer.parseInt(numberArray[1]);\n\n\tString inputArray[] = br.readLine().split(\" \");\n\tint priceArray[] = new int[N];\n\tfor (int i = 0; i < N; i++) {\n\t priceArray[i] = Integer.parseInt(inputArray[i]);\n\t}\n\n\tArrays.sort(priceArray);\n\tint result = 0;\n\tfor (int j = 0; j < K; j++) {\n\t result += priceArray[j];\n\t}\n\tSystem.out.println(result);\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String numberArray[] = br.readLine().split(" ");
int N = Integer.parseInt(numberArray[0]);
int K = Integer.parseInt(numberArray[1]);
String inputArray[] = br.readLine().split(" ");
int priceArray[] = new int[N];
for (int i = 0; i < N; i++) {
priceArray[i] = Integer.parseInt(inputArray[i]);
}
Arrays.sort(priceArray);
int result = 0;
for (int j = 0; j < K; j++) {
result += priceArray[j];
}
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint r = 0;\n\t\tfor (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}\n\t\tSystem.out.println(r);\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint r = 0;\n\t\tfor (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}\n\t\tSystem.out.println(r);\n\t}\n}",
"Main",
"public static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint r = 0;\n\t\tfor (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}\n\t\tSystem.out.println(r);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint r = 0;\n\t\tfor (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}\n\t\tSystem.out.println(r);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\ta[i] = sc.nextInt();\n\t\t}",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int r = 0;",
"r",
"0",
"for (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tr += a[i];\n\t\t}",
"{\n\t\t\tr += a[i];\n\t\t}",
"r += a[i]",
"r",
"a[i]",
"a",
"i",
"System.out.println(r)",
"System.out.println",
"System.out",
"System",
"System.out",
"r",
"final String[] args",
"args",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint r = 0;\n\t\tfor (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}\n\t\tSystem.out.println(r);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(a);\n\t\tint r = 0;\n\t\tfor (int i=0;i<k;i++) {\n\t\t\tr += a[i];\n\t\t}\n\t\tSystem.out.println(r);\n\t}\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), k = sc.nextInt();
int[] a = new int[n];
for (int i=0;i<n;i++) {
a[i] = sc.nextInt();
}
Arrays.sort(a);
int r = 0;
for (int i=0;i<k;i++) {
r += a[i];
}
System.out.println(r);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
85,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
11,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
9,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n \n \n int total = scn.nextInt();\n int nof = scn.nextInt();\n \n int[] prize = new int[total];\n for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }\n Arrays.sort(prize);\n int sum=0;\n for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }\n System.out.print(sum);\n\n\n\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n \n \n int total = scn.nextInt();\n int nof = scn.nextInt();\n \n int[] prize = new int[total];\n for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }\n Arrays.sort(prize);\n int sum=0;\n for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }\n System.out.print(sum);\n\n\n\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n \n \n int total = scn.nextInt();\n int nof = scn.nextInt();\n \n int[] prize = new int[total];\n for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }\n Arrays.sort(prize);\n int sum=0;\n for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }\n System.out.print(sum);\n\n\n\n }",
"main",
"{\n Scanner scn = new Scanner(System.in);\n \n \n int total = scn.nextInt();\n int nof = scn.nextInt();\n \n int[] prize = new int[total];\n for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }\n Arrays.sort(prize);\n int sum=0;\n for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }\n System.out.print(sum);\n\n\n\n }",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int total = scn.nextInt();",
"total",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int nof = scn.nextInt();",
"nof",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int[] prize = new int[total];",
"prize",
"new int[total]",
"total",
"for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < total",
"i",
"total",
"i++",
"i++",
"i",
"{\n prize[i]= scn.nextInt();\n }",
"{\n prize[i]= scn.nextInt();\n }",
"prize[i]= scn.nextInt()",
"prize[i]",
"prize",
"i",
"scn.nextInt()",
"scn.nextInt",
"scn",
"Arrays.sort(prize)",
"Arrays.sort",
"Arrays",
"prize",
"int sum=0;",
"sum",
"0",
"for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < nof",
"i",
"nof",
"i++",
"i++",
"i",
"{\n sum = sum + prize[i];\n }",
"{\n sum = sum + prize[i];\n }",
"sum = sum + prize[i]",
"sum",
"sum + prize[i]",
"sum",
"prize[i]",
"prize",
"i",
"System.out.print(sum)",
"System.out.print",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n \n \n int total = scn.nextInt();\n int nof = scn.nextInt();\n \n int[] prize = new int[total];\n for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }\n Arrays.sort(prize);\n int sum=0;\n for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }\n System.out.print(sum);\n\n\n\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n \n \n int total = scn.nextInt();\n int nof = scn.nextInt();\n \n int[] prize = new int[total];\n for (int i = 0; i < total; i++) {\n prize[i]= scn.nextInt();\n }\n Arrays.sort(prize);\n int sum=0;\n for (int i = 0; i < nof; i++) {\n sum = sum + prize[i];\n }\n System.out.print(sum);\n\n\n\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scn = new Scanner(System.in);
int total = scn.nextInt();
int nof = scn.nextInt();
int[] prize = new int[total];
for (int i = 0; i < total; i++) {
prize[i]= scn.nextInt();
}
Arrays.sort(prize);
int sum=0;
for (int i = 0; i < nof; i++) {
sum = sum + prize[i];
}
System.out.print(sum);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
95,
8
],
[
95,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
11,
58
],
[
58,
59
],
[
58,
60
],
[
11,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
11,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
11,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
11,
89
],
[
89,
90
],
[
90,
91
],
[
9,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
]
| [
"\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n \tScanner scanner = new Scanner(System.in);\n \tint N = Integer.parseInt(scanner.next());\n \tint K = Integer.parseInt(scanner.next());\n \tint[] fruits = new int[N];\n \tfor(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}\n \tint sum = 0;\n \tArrays.sort(fruits);\n \tfor(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}\n \tSystem.out.println(sum);\n \tscanner.close();\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n \tScanner scanner = new Scanner(System.in);\n \tint N = Integer.parseInt(scanner.next());\n \tint K = Integer.parseInt(scanner.next());\n \tint[] fruits = new int[N];\n \tfor(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}\n \tint sum = 0;\n \tArrays.sort(fruits);\n \tfor(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}\n \tSystem.out.println(sum);\n \tscanner.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n \tScanner scanner = new Scanner(System.in);\n \tint N = Integer.parseInt(scanner.next());\n \tint K = Integer.parseInt(scanner.next());\n \tint[] fruits = new int[N];\n \tfor(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}\n \tint sum = 0;\n \tArrays.sort(fruits);\n \tfor(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}\n \tSystem.out.println(sum);\n \tscanner.close();\n }",
"main",
"{\n \tScanner scanner = new Scanner(System.in);\n \tint N = Integer.parseInt(scanner.next());\n \tint K = Integer.parseInt(scanner.next());\n \tint[] fruits = new int[N];\n \tfor(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}\n \tint sum = 0;\n \tArrays.sort(fruits);\n \tfor(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}\n \tSystem.out.println(sum);\n \tscanner.close();\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = Integer.parseInt(scanner.next());",
"N",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"int K = Integer.parseInt(scanner.next());",
"K",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"int[] fruits = new int[N];",
"fruits",
"new int[N]",
"N",
"for(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}",
"{\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}",
"fruits[i] = Integer.parseInt(scanner.next())",
"fruits[i]",
"fruits",
"i",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"int sum = 0;",
"sum",
"0",
"Arrays.sort(fruits)",
"Arrays.sort",
"Arrays",
"fruits",
"for(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n \t\tsum += fruits[i];\n \t}",
"{\n \t\tsum += fruits[i];\n \t}",
"sum += fruits[i]",
"sum",
"fruits[i]",
"fruits",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n \tScanner scanner = new Scanner(System.in);\n \tint N = Integer.parseInt(scanner.next());\n \tint K = Integer.parseInt(scanner.next());\n \tint[] fruits = new int[N];\n \tfor(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}\n \tint sum = 0;\n \tArrays.sort(fruits);\n \tfor(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}\n \tSystem.out.println(sum);\n \tscanner.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n \tScanner scanner = new Scanner(System.in);\n \tint N = Integer.parseInt(scanner.next());\n \tint K = Integer.parseInt(scanner.next());\n \tint[] fruits = new int[N];\n \tfor(int i=0;i<N;i++) {\n \t\tfruits[i] = Integer.parseInt(scanner.next());\n \t}\n \tint sum = 0;\n \tArrays.sort(fruits);\n \tfor(int i=0;i<K;i++) {\n \t\tsum += fruits[i];\n \t}\n \tSystem.out.println(sum);\n \tscanner.close();\n }\n}",
"Main"
]
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = Integer.parseInt(scanner.next());
int K = Integer.parseInt(scanner.next());
int[] fruits = new int[N];
for(int i=0;i<N;i++) {
fruits[i] = Integer.parseInt(scanner.next());
}
int sum = 0;
Arrays.sort(fruits);
for(int i=0;i<K;i++) {
sum += fruits[i];
}
System.out.println(sum);
scanner.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
2,
18,
13,
13,
17,
41,
13,
2,
18,
13,
13,
17,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
13,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
18,
4,
18,
4,
13,
17,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
269,
8
],
[
269,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
269,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
269,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
269,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
30,
47
],
[
47,
48
],
[
47,
49
],
[
30,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
30,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
30,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
28,
75
],
[
75,
76
],
[
28,
77
],
[
77,
78
],
[
269,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
88,
89
],
[
88,
90
],
[
88,
91
],
[
81,
92
],
[
92,
93
],
[
93,
94
],
[
79,
95
],
[
95,
96
],
[
269,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
97,
101
],
[
101,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
103,
112
],
[
112,
113
],
[
97,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
117,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
127,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
116,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
97,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
97,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
157,
158
],
[
97,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
166,
167
],
[
97,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
172,
177
],
[
97,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
185,
190
],
[
190,
191
],
[
190,
192
],
[
185,
193
],
[
193,
194
],
[
194,
195
],
[
185,
196
],
[
197,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
180,
204
],
[
204,
205
],
[
178,
206
],
[
206,
207
],
[
97,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
210,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
215,
220
],
[
220,
221
],
[
220,
222
],
[
215,
223
],
[
223,
224
],
[
224,
225
],
[
215,
226
],
[
227,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
210,
234
],
[
234,
235
],
[
208,
236
],
[
236,
237
],
[
97,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
245,
250
],
[
250,
251
],
[
250,
252
],
[
245,
253
],
[
253,
254
],
[
254,
255
],
[
245,
256
],
[
257,
257
],
[
257,
258
],
[
258,
259
],
[
259,
260
],
[
259,
261
],
[
258,
262
],
[
262,
263
],
[
240,
264
],
[
264,
265
],
[
238,
266
],
[
266,
267
],
[
0,
268
],
[
268,
269
],
[
268,
270
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static final long mod = (long)1e9+7;\n public static final long INF = Long.MAX_VALUE/2;\n public static final int inf = Integer.MAX_VALUE/2;\n\n static void solve(InputReader in, PrintWriter out){\n int n = in.ni(), k = in.ni();\n int[] p = in.ni(n);\n int ans = 0;\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n out.println(ans);\n }\n\n public static void main(String[] args){\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n solve(in, out);\n out.close();\n }\n public static class InputReader{\n private BufferedReader br;\n private StringTokenizer st;\n public InputReader(InputStream is){\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }\n public String ns(){\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n public int ni(){\n return Integer.parseInt(ns());\n }\n public long nl(){\n return Long.parseLong(ns());\n }\n public double nd(){\n return Double.parseDouble(ns());\n }\n public char nc(){\n return ns().toCharArray()[0];\n }\n public int[] ni(int n){\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }\n public long[] nl(int n){\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }\n public double[] nd(int n){\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static final long mod = (long)1e9+7;\n public static final long INF = Long.MAX_VALUE/2;\n public static final int inf = Integer.MAX_VALUE/2;\n\n static void solve(InputReader in, PrintWriter out){\n int n = in.ni(), k = in.ni();\n int[] p = in.ni(n);\n int ans = 0;\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n out.println(ans);\n }\n\n public static void main(String[] args){\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n solve(in, out);\n out.close();\n }\n public static class InputReader{\n private BufferedReader br;\n private StringTokenizer st;\n public InputReader(InputStream is){\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }\n public String ns(){\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n public int ni(){\n return Integer.parseInt(ns());\n }\n public long nl(){\n return Long.parseLong(ns());\n }\n public double nd(){\n return Double.parseDouble(ns());\n }\n public char nc(){\n return ns().toCharArray()[0];\n }\n public int[] ni(int n){\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }\n public long[] nl(int n){\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }\n public double[] nd(int n){\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }\n }\n}",
"Main",
"public static final long mod = (long)1e9+7;",
"mod",
"(long)1e9+7",
"(long)1e9",
"7",
"public static final long INF = Long.MAX_VALUE/2;",
"INF",
"Long.MAX_VALUE/2",
"Long.MAX_VALUE",
"Long",
"Long.MAX_VALUE",
"2",
"public static final int inf = Integer.MAX_VALUE/2;",
"inf",
"Integer.MAX_VALUE/2",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"2",
"static void solve(InputReader in, PrintWriter out){\n int n = in.ni(), k = in.ni();\n int[] p = in.ni(n);\n int ans = 0;\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n out.println(ans);\n }",
"solve",
"{\n int n = in.ni(), k = in.ni();\n int[] p = in.ni(n);\n int ans = 0;\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n out.println(ans);\n }",
"int n = in.ni()",
"n",
"in.ni()",
"in.ni",
"in",
"k = in.ni();",
"k",
"in.ni()",
"in.ni",
"in",
"int[] p = in.ni(n);",
"p",
"in.ni(n)",
"in.ni",
"in",
"n",
"int ans = 0;",
"ans",
"0",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"for (int i = 0; i < k; i++) ans += p[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"ans += p[i];",
"ans += p[i]",
"ans",
"p[i]",
"p",
"i",
"out.println(ans)",
"out.println",
"out",
"ans",
"InputReader in",
"in",
"PrintWriter out",
"out",
"public static void main(String[] args){\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n solve(in, out);\n out.close();\n }",
"main",
"{\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n solve(in, out);\n out.close();\n }",
"InputReader in = new InputReader(System.in);",
"in",
"new InputReader(System.in)",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"solve(in, out)",
"solve",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public static class InputReader{\n private BufferedReader br;\n private StringTokenizer st;\n public InputReader(InputStream is){\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }\n public String ns(){\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n public int ni(){\n return Integer.parseInt(ns());\n }\n public long nl(){\n return Long.parseLong(ns());\n }\n public double nd(){\n return Double.parseDouble(ns());\n }\n public char nc(){\n return ns().toCharArray()[0];\n }\n public int[] ni(int n){\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }\n public long[] nl(int n){\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }\n public double[] nd(int n){\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }\n }",
"InputReader",
"private BufferedReader br;",
"br",
"private StringTokenizer st;",
"st",
"public InputReader(InputStream is){\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }",
"InputReader",
"{\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }",
"br = new BufferedReader(new InputStreamReader(is))",
"br",
"new BufferedReader(new InputStreamReader(is))",
"st = null",
"st",
"null",
"InputStream is",
"is",
"public String ns(){\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }",
"ns",
"{\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }",
"if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }",
"try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }",
"catch (Exception e){\n throw new RuntimeException(e);\n }",
"Exception e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int ni(){\n return Integer.parseInt(ns());\n }",
"ni",
"{\n return Integer.parseInt(ns());\n }",
"return Integer.parseInt(ns());",
"Integer.parseInt(ns())",
"Integer.parseInt",
"Integer",
"ns()",
"ns",
"public long nl(){\n return Long.parseLong(ns());\n }",
"nl",
"{\n return Long.parseLong(ns());\n }",
"return Long.parseLong(ns());",
"Long.parseLong(ns())",
"Long.parseLong",
"Long",
"ns()",
"ns",
"public double nd(){\n return Double.parseDouble(ns());\n }",
"nd",
"{\n return Double.parseDouble(ns());\n }",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"public char nc(){\n return ns().toCharArray()[0];\n }",
"nc",
"{\n return ns().toCharArray()[0];\n }",
"return ns().toCharArray()[0];",
"ns().toCharArray()[0]",
"ns().toCharArray()",
"ns().toCharArray",
"ns()",
"ns",
"0",
"public int[] ni(int n){\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }",
"ni",
"{\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = ni();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = ni();\n }",
"{\n a[i] = ni();\n }",
"a[i] = ni()",
"a[i]",
"a",
"i",
"ni()",
"ni",
"return a;",
"a",
"int n",
"n",
"public long[] nl(int n){\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }",
"nl",
"{\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nl();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nl();\n }",
"{\n a[i] = nl();\n }",
"a[i] = nl()",
"a[i]",
"a",
"i",
"nl()",
"nl",
"return a;",
"a",
"int n",
"n",
"public double[] nd(int n){\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }",
"nd",
"{\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }",
"double[] a = new double[n];",
"a",
"new double[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nd();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nd();\n }",
"{\n a[i] = nd();\n }",
"a[i] = nd()",
"a[i]",
"a",
"i",
"nd()",
"nd",
"return a;",
"a",
"int n",
"n",
"public class Main {\n public static final long mod = (long)1e9+7;\n public static final long INF = Long.MAX_VALUE/2;\n public static final int inf = Integer.MAX_VALUE/2;\n\n static void solve(InputReader in, PrintWriter out){\n int n = in.ni(), k = in.ni();\n int[] p = in.ni(n);\n int ans = 0;\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n out.println(ans);\n }\n\n public static void main(String[] args){\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n solve(in, out);\n out.close();\n }\n public static class InputReader{\n private BufferedReader br;\n private StringTokenizer st;\n public InputReader(InputStream is){\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }\n public String ns(){\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n public int ni(){\n return Integer.parseInt(ns());\n }\n public long nl(){\n return Long.parseLong(ns());\n }\n public double nd(){\n return Double.parseDouble(ns());\n }\n public char nc(){\n return ns().toCharArray()[0];\n }\n public int[] ni(int n){\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }\n public long[] nl(int n){\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }\n public double[] nd(int n){\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }\n }\n}",
"public class Main {\n public static final long mod = (long)1e9+7;\n public static final long INF = Long.MAX_VALUE/2;\n public static final int inf = Integer.MAX_VALUE/2;\n\n static void solve(InputReader in, PrintWriter out){\n int n = in.ni(), k = in.ni();\n int[] p = in.ni(n);\n int ans = 0;\n Arrays.sort(p);\n for (int i = 0; i < k; i++) ans += p[i];\n out.println(ans);\n }\n\n public static void main(String[] args){\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n solve(in, out);\n out.close();\n }\n public static class InputReader{\n private BufferedReader br;\n private StringTokenizer st;\n public InputReader(InputStream is){\n br = new BufferedReader(new InputStreamReader(is));\n st = null;\n }\n public String ns(){\n if(st == null || !st.hasMoreTokens()){\n try{\n st = new StringTokenizer(br.readLine());\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n public int ni(){\n return Integer.parseInt(ns());\n }\n public long nl(){\n return Long.parseLong(ns());\n }\n public double nd(){\n return Double.parseDouble(ns());\n }\n public char nc(){\n return ns().toCharArray()[0];\n }\n public int[] ni(int n){\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = ni();\n }\n return a;\n }\n public long[] nl(int n){\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nl();\n }\n return a;\n }\n public double[] nd(int n){\n double[] a = new double[n];\n for (int i = 0; i < n; i++) {\n a[i] = nd();\n }\n return a;\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static final long mod = (long)1e9+7;
public static final long INF = Long.MAX_VALUE/2;
public static final int inf = Integer.MAX_VALUE/2;
static void solve(InputReader in, PrintWriter out){
int n = in.ni(), k = in.ni();
int[] p = in.ni(n);
int ans = 0;
Arrays.sort(p);
for (int i = 0; i < k; i++) ans += p[i];
out.println(ans);
}
public static void main(String[] args){
InputReader in = new InputReader(System.in);
PrintWriter out = new PrintWriter(System.out);
solve(in, out);
out.close();
}
public static class InputReader{
private BufferedReader br;
private StringTokenizer st;
public InputReader(InputStream is){
br = new BufferedReader(new InputStreamReader(is));
st = null;
}
public String ns(){
if(st == null || !st.hasMoreTokens()){
try{
st = new StringTokenizer(br.readLine());
}catch (Exception e){
throw new RuntimeException(e);
}
}
return st.nextToken();
}
public int ni(){
return Integer.parseInt(ns());
}
public long nl(){
return Long.parseLong(ns());
}
public double nd(){
return Double.parseDouble(ns());
}
public char nc(){
return ns().toCharArray()[0];
}
public int[] ni(int n){
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = ni();
}
return a;
}
public long[] nl(int n){
long[] a = new long[n];
for (int i = 0; i < n; i++) {
a[i] = nl();
}
return a;
}
public double[] nd(int n){
double[] a = new double[n];
for (int i = 0; i < n; i++) {
a[i] = nd();
}
return a;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
140,
5
],
[
140,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
39,
45
],
[
45,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
61,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
76,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
86,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
8,
108
],
[
108,
109
],
[
108,
110
],
[
8,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
8,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
6,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
]
| [
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }\n for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }\n int s = 0;\n for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }\n System.out.println(s);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }\n for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }\n int s = 0;\n for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }\n System.out.println(s);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }\n for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }\n int s = 0;\n for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }\n System.out.println(s);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }\n for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }\n int s = 0;\n for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }\n System.out.println(s);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] p = new int[n];",
"p",
"new int[n]",
"n",
"for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n p[i - 1] = sc.nextInt(); \n }",
"{\n p[i - 1] = sc.nextInt(); \n }",
"p[i - 1] = sc.nextInt()",
"p[i - 1]",
"p",
"i - 1",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }",
"{\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }",
"for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < n - 1",
"j",
"n - 1",
"n",
"1",
"j++",
"j++",
"j",
"{\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }",
"{\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }",
"if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }",
"p[j] > p[j + 1]",
"p[j]",
"p",
"j",
"p[j + 1]",
"p",
"j + 1",
"j",
"1",
"{\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }",
"int ko = p[j];",
"ko",
"p[j]",
"p",
"j",
"p[j] = p[j + 1]",
"p[j]",
"p",
"j",
"p[j + 1]",
"p",
"j + 1",
"j",
"1",
"p[j + 1] = ko",
"p[j + 1]",
"p",
"j + 1",
"j",
"1",
"ko",
"int s = 0;",
"s",
"0",
"for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n s = s + p[i];\n }",
"{\n s = s + p[i];\n }",
"s = s + p[i]",
"s",
"s + p[i]",
"s",
"p[i]",
"p",
"i",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }\n for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }\n int s = 0;\n for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }\n System.out.println(s);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] p = new int[n];\n for(int i = 1 ; i <= n ; i++ ){\n p[i - 1] = sc.nextInt(); \n }\n for(int i = 1; i <= n ; i++ ){\n for(int j = 0 ; j < n - 1 ; j++ ){\n if(p[j] > p[j + 1]){\n int ko = p[j];\n p[j] = p[j + 1];\n p[j + 1] = ko;\n }\n }\n }\n int s = 0;\n for(int i = 0 ; i < k ; i++ ){\n s = s + p[i];\n }\n System.out.println(s);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] p = new int[n];
for(int i = 1 ; i <= n ; i++ ){
p[i - 1] = sc.nextInt();
}
for(int i = 1; i <= n ; i++ ){
for(int j = 0 ; j < n - 1 ; j++ ){
if(p[j] > p[j + 1]){
int ko = p[j];
p[j] = p[j + 1];
p[j + 1] = ko;
}
}
}
int s = 0;
for(int i = 0 ; i < k ; i++ ){
s = s + p[i];
}
System.out.println(s);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
13,
20,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
41,
13,
20,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
18,
13,
13,
0,
13,
17,
29,
13,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
40,
17,
30,
29,
40,
17,
0,
13,
17,
29,
18,
13,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
40,
2,
2,
13,
40,
17,
4,
13,
13,
30,
0,
13,
4,
13,
14,
2,
13,
40,
17,
30,
37,
20,
29,
13,
12,
13,
30,
29,
4,
13,
17,
12,
13,
30,
41,
13,
4,
13,
42,
40,
2,
2,
13,
40,
17,
4,
13,
13,
30,
0,
13,
4,
13,
14,
2,
13,
40,
17,
30,
37,
20,
41,
13,
20,
42,
2,
2,
13,
40,
17,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
40,
2,
2,
13,
40,
17,
4,
13,
13,
30,
0,
13,
4,
13,
14,
2,
13,
40,
17,
30,
37,
20,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
41,
13,
17,
42,
2,
2,
13,
40,
17,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
37,
20,
0,
13,
2,
2,
13,
17,
2,
13,
17,
0,
13,
4,
13,
29,
8,
13,
40,
13,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
30,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
4,
13,
13,
23,
13,
12,
13,
30,
4,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
14,
2,
18,
13,
13,
17,
30,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
18,
13,
23,
13,
23,
13,
12,
13,
30,
4,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
14,
2,
18,
13,
13,
17,
30,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
18,
13,
23,
13,
23,
13,
12,
13,
30,
4,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
4,
18,
13,
4,
18,
13,
30,
30,
4,
18,
13,
4,
18,
13,
42,
4,
18,
13,
30,
4,
18,
4,
18,
13,
13,
4,
18,
13,
4,
13,
4,
18,
13,
23,
13,
23,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
870,
29
],
[
870,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
32,
49
],
[
49,
50
],
[
49,
51
],
[
32,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
32,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
32,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
30,
77
],
[
77,
78
],
[
30,
79
],
[
79,
80
],
[
870,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
87,
89
],
[
87,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
81,
94
],
[
94,
95
],
[
870,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
96,
103
],
[
103,
104
],
[
103,
105
],
[
96,
107
],
[
107,
108
],
[
96,
109
],
[
109,
110
],
[
96,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
111,
119
],
[
119,
120
],
[
96,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
128,
134
],
[
134,
135
],
[
134,
136
],
[
128,
137
],
[
137,
138
],
[
123,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
139,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
123,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
152,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
123,
161
],
[
161,
162
],
[
161,
163
],
[
123,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
96,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
176,
178
],
[
168,
179
],
[
179,
180
],
[
96,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
183,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
190,
195
],
[
195,
196
],
[
195,
197
],
[
188,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
183,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
203,
208
],
[
208,
209
],
[
209,
210
],
[
183,
211
],
[
211,
212
],
[
96,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
96,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
222,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
229,
234
],
[
234,
235
],
[
234,
236
],
[
227,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
222,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
242,
247
],
[
247,
248
],
[
248,
249
],
[
222,
250
],
[
250,
251
],
[
250,
252
],
[
222,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
254,
259
],
[
259,
260
],
[
259,
261
],
[
253,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
263,
266
],
[
262,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
222,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
220,
275
],
[
275,
276
],
[
96,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
279,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
286,
291
],
[
291,
292
],
[
291,
293
],
[
284,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
279,
299
],
[
299,
300
],
[
300,
301
],
[
300,
302
],
[
302,
303
],
[
299,
304
],
[
304,
305
],
[
305,
306
],
[
279,
307
],
[
307,
308
],
[
307,
309
],
[
279,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
310,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
314,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
279,
322
],
[
322,
323
],
[
322,
324
],
[
279,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
329,
330
],
[
326,
331
],
[
331,
332
],
[
331,
333
],
[
325,
334
],
[
334,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
340,
341
],
[
340,
342
],
[
335,
343
],
[
343,
344
],
[
344,
345
],
[
334,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
348,
352
],
[
352,
353
],
[
352,
354
],
[
334,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
279,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
360,
364
],
[
96,
365
],
[
365,
366
],
[
365,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
367,
372
],
[
372,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
376,
378
],
[
373,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
381,
383
],
[
372,
384
],
[
384,
385
],
[
385,
386
],
[
367,
387
],
[
387,
388
],
[
96,
389
],
[
389,
390
],
[
389,
391
],
[
391,
392
],
[
392,
393
],
[
393,
394
],
[
394,
395
],
[
393,
396
],
[
396,
397
],
[
96,
398
],
[
398,
399
],
[
398,
400
],
[
400,
401
],
[
401,
402
],
[
401,
403
],
[
400,
405
],
[
405,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
405,
410
],
[
410,
411
],
[
410,
412
],
[
405,
413
],
[
413,
414
],
[
414,
415
],
[
405,
416
],
[
417,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
418,
422
],
[
422,
423
],
[
400,
424
],
[
424,
425
],
[
398,
426
],
[
426,
427
],
[
96,
428
],
[
428,
429
],
[
428,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
430,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
437,
439
],
[
435,
440
],
[
440,
441
],
[
440,
442
],
[
435,
443
],
[
443,
444
],
[
444,
445
],
[
435,
446
],
[
447,
447
],
[
447,
448
],
[
448,
449
],
[
449,
450
],
[
449,
451
],
[
448,
452
],
[
452,
453
],
[
430,
454
],
[
454,
455
],
[
428,
456
],
[
456,
457
],
[
96,
458
],
[
458,
459
],
[
458,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
460,
465
],
[
465,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
465,
470
],
[
470,
471
],
[
470,
472
],
[
465,
473
],
[
473,
474
],
[
474,
475
],
[
465,
476
],
[
477,
477
],
[
477,
478
],
[
478,
479
],
[
479,
480
],
[
479,
481
],
[
478,
482
],
[
482,
483
],
[
460,
484
],
[
484,
485
],
[
458,
486
],
[
486,
487
],
[
96,
488
],
[
488,
489
],
[
488,
490
],
[
490,
491
],
[
491,
492
],
[
491,
493
],
[
490,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
496,
501
],
[
501,
502
],
[
501,
503
],
[
496,
504
],
[
504,
505
],
[
505,
506
],
[
496,
507
],
[
508,
508
],
[
508,
509
],
[
509,
510
],
[
510,
511
],
[
511,
512
],
[
511,
513
],
[
509,
514
],
[
514,
515
],
[
514,
516
],
[
509,
517
],
[
517,
518
],
[
518,
519
],
[
509,
520
],
[
521,
521
],
[
521,
522
],
[
522,
523
],
[
523,
524
],
[
524,
525
],
[
524,
526
],
[
523,
527
],
[
522,
528
],
[
528,
529
],
[
490,
530
],
[
530,
531
],
[
488,
532
],
[
532,
533
],
[
488,
534
],
[
534,
535
],
[
96,
536
],
[
536,
537
],
[
536,
538
],
[
538,
539
],
[
539,
540
],
[
539,
541
],
[
538,
544
],
[
544,
545
],
[
545,
546
],
[
546,
547
],
[
546,
548
],
[
544,
549
],
[
549,
550
],
[
549,
551
],
[
544,
552
],
[
552,
553
],
[
553,
554
],
[
544,
555
],
[
556,
556
],
[
556,
557
],
[
557,
558
],
[
558,
559
],
[
559,
560
],
[
559,
561
],
[
557,
562
],
[
562,
563
],
[
562,
564
],
[
557,
565
],
[
565,
566
],
[
566,
567
],
[
557,
568
],
[
569,
569
],
[
569,
570
],
[
570,
571
],
[
571,
572
],
[
572,
573
],
[
572,
574
],
[
571,
575
],
[
570,
576
],
[
576,
577
],
[
538,
578
],
[
578,
579
],
[
536,
580
],
[
580,
581
],
[
536,
582
],
[
582,
583
],
[
96,
584
],
[
584,
585
],
[
584,
586
],
[
586,
587
],
[
587,
588
],
[
587,
589
],
[
586,
592
],
[
592,
593
],
[
593,
594
],
[
594,
595
],
[
594,
596
],
[
592,
597
],
[
597,
598
],
[
597,
599
],
[
592,
600
],
[
600,
601
],
[
601,
602
],
[
592,
603
],
[
604,
604
],
[
604,
605
],
[
605,
606
],
[
606,
607
],
[
607,
608
],
[
607,
609
],
[
605,
610
],
[
610,
611
],
[
610,
612
],
[
605,
613
],
[
613,
614
],
[
614,
615
],
[
605,
616
],
[
617,
617
],
[
617,
618
],
[
618,
619
],
[
619,
620
],
[
620,
621
],
[
620,
622
],
[
619,
623
],
[
618,
624
],
[
624,
625
],
[
586,
626
],
[
626,
627
],
[
584,
628
],
[
628,
629
],
[
584,
630
],
[
630,
631
],
[
96,
632
],
[
632,
633
],
[
632,
634
],
[
634,
635
],
[
635,
636
],
[
635,
637
],
[
634,
640
],
[
640,
641
],
[
641,
642
],
[
642,
643
],
[
642,
644
],
[
640,
645
],
[
645,
646
],
[
645,
647
],
[
640,
648
],
[
648,
649
],
[
649,
650
],
[
640,
651
],
[
652,
652
],
[
652,
653
],
[
653,
654
],
[
654,
655
],
[
655,
656
],
[
655,
657
],
[
653,
658
],
[
658,
659
],
[
658,
660
],
[
653,
661
],
[
661,
662
],
[
662,
663
],
[
653,
664
],
[
665,
665
],
[
665,
666
],
[
666,
667
],
[
667,
668
],
[
668,
669
],
[
668,
670
],
[
667,
671
],
[
666,
672
],
[
672,
673
],
[
634,
674
],
[
674,
675
],
[
632,
676
],
[
676,
677
],
[
632,
678
],
[
678,
679
],
[
870,
680
],
[
680,
681
],
[
680,
682
],
[
682,
683
],
[
682,
684
],
[
684,
685
],
[
685,
686
],
[
685,
687
],
[
682,
688
],
[
688,
689
],
[
680,
690
],
[
690,
691
],
[
690,
692
],
[
692,
693
],
[
693,
694
],
[
693,
695
],
[
693,
696
],
[
690,
697
],
[
697,
698
],
[
680,
699
],
[
699,
700
],
[
699,
701
],
[
701,
702
],
[
702,
703
],
[
702,
704
],
[
701,
705
],
[
705,
706
],
[
706,
707
],
[
707,
708
],
[
707,
709
],
[
706,
710
],
[
705,
711
],
[
711,
712
],
[
712,
713
],
[
713,
714
],
[
712,
715
],
[
715,
716
],
[
715,
717
],
[
711,
718
],
[
718,
719
],
[
719,
720
],
[
720,
721
],
[
720,
722
],
[
718,
723
],
[
723,
724
],
[
723,
725
],
[
725,
726
],
[
725,
727
],
[
718,
728
],
[
728,
729
],
[
729,
730
],
[
718,
731
],
[
732,
732
],
[
732,
733
],
[
733,
734
],
[
734,
735
],
[
735,
736
],
[
736,
737
],
[
735,
738
],
[
733,
739
],
[
739,
740
],
[
739,
741
],
[
701,
742
],
[
742,
743
],
[
742,
744
],
[
744,
745
],
[
745,
746
],
[
699,
747
],
[
747,
748
],
[
699,
749
],
[
749,
750
],
[
680,
751
],
[
751,
752
],
[
751,
753
],
[
753,
754
],
[
754,
755
],
[
754,
756
],
[
754,
757
],
[
751,
758
],
[
758,
759
],
[
680,
760
],
[
760,
761
],
[
760,
762
],
[
762,
763
],
[
763,
764
],
[
763,
765
],
[
762,
766
],
[
766,
767
],
[
767,
768
],
[
768,
769
],
[
768,
770
],
[
767,
771
],
[
766,
772
],
[
772,
773
],
[
773,
774
],
[
774,
775
],
[
773,
776
],
[
776,
777
],
[
776,
778
],
[
772,
779
],
[
779,
780
],
[
780,
781
],
[
781,
782
],
[
781,
783
],
[
779,
784
],
[
784,
785
],
[
784,
786
],
[
786,
787
],
[
786,
788
],
[
779,
789
],
[
789,
790
],
[
790,
791
],
[
779,
792
],
[
793,
793
],
[
793,
794
],
[
794,
795
],
[
795,
796
],
[
796,
797
],
[
797,
798
],
[
796,
799
],
[
794,
800
],
[
800,
801
],
[
800,
802
],
[
762,
803
],
[
803,
804
],
[
803,
805
],
[
805,
806
],
[
806,
807
],
[
760,
808
],
[
808,
809
],
[
760,
810
],
[
810,
811
],
[
680,
812
],
[
812,
813
],
[
812,
814
],
[
814,
815
],
[
815,
816
],
[
815,
817
],
[
815,
818
],
[
812,
819
],
[
819,
820
],
[
680,
821
],
[
821,
822
],
[
821,
823
],
[
823,
824
],
[
824,
825
],
[
824,
826
],
[
823,
827
],
[
827,
828
],
[
828,
829
],
[
829,
830
],
[
829,
831
],
[
831,
832
],
[
832,
833
],
[
827,
834
],
[
834,
835
],
[
835,
836
],
[
827,
837
],
[
838,
838
],
[
838,
839
],
[
839,
840
],
[
840,
841
],
[
839,
842
],
[
842,
843
],
[
843,
844
],
[
838,
845
],
[
845,
846
],
[
846,
847
],
[
847,
848
],
[
845,
849
],
[
849,
850
],
[
850,
851
],
[
851,
852
],
[
852,
853
],
[
853,
854
],
[
852,
855
],
[
850,
856
],
[
856,
857
],
[
857,
858
],
[
823,
859
],
[
859,
860
],
[
859,
861
],
[
861,
862
],
[
862,
863
],
[
821,
864
],
[
864,
865
],
[
821,
866
],
[
866,
867
],
[
680,
868
],
[
0,
869
],
[
869,
870
],
[
869,
871
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.InputMismatchException;\nimport java.util.Iterator;\nimport java.util.NoSuchElementException;\nimport java.util.regex.Pattern;\nimport java.util.Arrays;\n \npublic class Main {\n static void solve(MyScanner in, MyWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n\t int[] a = in.nextIntArray(n);\n int ans =0;\n \n Arrays.sort(a);\n for(int i=0;i<k;i++) ans += a[i];\n\n out.println(ans);\n }\n\n public static void main(String[] args) {\n MyWriter w = new MyWriter(System.out);\n solve(new MyScanner(System.in), w);\n w.flush();\n }\n static final class MyScanner {\n static final int BUFFER_SIZE = 8192;\n private final InputStream in;\n private final byte[] buffer = new byte[BUFFER_SIZE];\n private int point;\n private int readLength;\n \n MyScanner(InputStream in) {\n this.in = in;\n }\n private byte readByte() {\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }\n private static boolean isPrintableCharExceptSpace(byte c) {\n return 33 <= c && c <= 126;\n }\n public char nextChar() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }\n public String next() {\n return next(16);\n }\n public String next(int n) {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }\n public long nextLong() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }\n public int nextInt() {\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n public int[] nextIntArray(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n public long[] nextLongArray(int n) {\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n public char[] nextCharArray(int n) {\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }\n public char[][] next2dCharArray(int n, int m) {\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }\n public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }\n public long[][] nextVerticalLongArrays(int arrayCount,\n int arrayLength) {\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }\n public char[][] nextVerticalCharArrays(int arrayCount,\n int arrayLength) {\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }\n }\n static final class MyWriter extends PrintWriter {\n MyWriter(OutputStream out) {\n super(out);\n }\n public void joinAndPrintln(int[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(int[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(long[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(long[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(Iterable<?> iterable) {\n joinAndPrintln(iterable, \" \");\n }\n public void joinAndPrintln(Iterable<?> iterable, String delimiter) {\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.util.Iterator;",
"Iterator",
"java.util",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"import java.util.regex.Pattern;",
"Pattern",
"java.util.regex",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n static void solve(MyScanner in, MyWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n\t int[] a = in.nextIntArray(n);\n int ans =0;\n \n Arrays.sort(a);\n for(int i=0;i<k;i++) ans += a[i];\n\n out.println(ans);\n }\n\n public static void main(String[] args) {\n MyWriter w = new MyWriter(System.out);\n solve(new MyScanner(System.in), w);\n w.flush();\n }\n static final class MyScanner {\n static final int BUFFER_SIZE = 8192;\n private final InputStream in;\n private final byte[] buffer = new byte[BUFFER_SIZE];\n private int point;\n private int readLength;\n \n MyScanner(InputStream in) {\n this.in = in;\n }\n private byte readByte() {\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }\n private static boolean isPrintableCharExceptSpace(byte c) {\n return 33 <= c && c <= 126;\n }\n public char nextChar() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }\n public String next() {\n return next(16);\n }\n public String next(int n) {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }\n public long nextLong() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }\n public int nextInt() {\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n public int[] nextIntArray(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n public long[] nextLongArray(int n) {\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n public char[] nextCharArray(int n) {\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }\n public char[][] next2dCharArray(int n, int m) {\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }\n public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }\n public long[][] nextVerticalLongArrays(int arrayCount,\n int arrayLength) {\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }\n public char[][] nextVerticalCharArrays(int arrayCount,\n int arrayLength) {\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }\n }\n static final class MyWriter extends PrintWriter {\n MyWriter(OutputStream out) {\n super(out);\n }\n public void joinAndPrintln(int[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(int[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(long[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(long[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(Iterable<?> iterable) {\n joinAndPrintln(iterable, \" \");\n }\n public void joinAndPrintln(Iterable<?> iterable, String delimiter) {\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }\n }\n}",
"Main",
"static void solve(MyScanner in, MyWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n\t int[] a = in.nextIntArray(n);\n int ans =0;\n \n Arrays.sort(a);\n for(int i=0;i<k;i++) ans += a[i];\n\n out.println(ans);\n }",
"solve",
"{\n int n = in.nextInt();\n int k = in.nextInt();\n\t int[] a = in.nextIntArray(n);\n int ans =0;\n \n Arrays.sort(a);\n for(int i=0;i<k;i++) ans += a[i];\n\n out.println(ans);\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int[] a = in.nextIntArray(n);",
"a",
"in.nextIntArray(n)",
"in.nextIntArray",
"in",
"n",
"int ans =0;",
"ans",
"0",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"for(int i=0;i<k;i++) ans += a[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"ans += a[i];",
"ans += a[i]",
"ans",
"a[i]",
"a",
"i",
"out.println(ans)",
"out.println",
"out",
"ans",
"MyScanner in",
"in",
"MyWriter out",
"out",
"public static void main(String[] args) {\n MyWriter w = new MyWriter(System.out);\n solve(new MyScanner(System.in), w);\n w.flush();\n }",
"main",
"{\n MyWriter w = new MyWriter(System.out);\n solve(new MyScanner(System.in), w);\n w.flush();\n }",
"MyWriter w = new MyWriter(System.out);",
"w",
"new MyWriter(System.out)",
"solve(new MyScanner(System.in), w)",
"solve",
"new MyScanner(System.in)",
"w",
"w.flush()",
"w.flush",
"w",
"String[] args",
"args",
"static final class MyScanner {\n static final int BUFFER_SIZE = 8192;\n private final InputStream in;\n private final byte[] buffer = new byte[BUFFER_SIZE];\n private int point;\n private int readLength;\n \n MyScanner(InputStream in) {\n this.in = in;\n }\n private byte readByte() {\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }\n private static boolean isPrintableCharExceptSpace(byte c) {\n return 33 <= c && c <= 126;\n }\n public char nextChar() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }\n public String next() {\n return next(16);\n }\n public String next(int n) {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }\n public long nextLong() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }\n public int nextInt() {\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n public int[] nextIntArray(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n public long[] nextLongArray(int n) {\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n public char[] nextCharArray(int n) {\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }\n public char[][] next2dCharArray(int n, int m) {\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }\n public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }\n public long[][] nextVerticalLongArrays(int arrayCount,\n int arrayLength) {\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }\n public char[][] nextVerticalCharArrays(int arrayCount,\n int arrayLength) {\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }\n }",
"MyScanner",
"static final int BUFFER_SIZE = 8192;",
"BUFFER_SIZE",
"8192",
"private final InputStream in;",
"in",
"private final byte[] buffer = new byte[BUFFER_SIZE];",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"private int point;",
"point",
"private int readLength;",
"readLength",
"MyScanner(InputStream in) {\n this.in = in;\n }",
"MyScanner",
"{\n this.in = in;\n }",
"this.in = in",
"this.in",
"this",
"this.in",
"in",
"InputStream in",
"in",
"private byte readByte() {\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }",
"readByte",
"{\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }",
"if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }",
"point < readLength",
"point",
"readLength",
"{\n byte result = buffer[point];\n point += 1;\n return result;\n }",
"byte result = buffer[point];",
"result",
"buffer[point]",
"buffer",
"point",
"point += 1",
"point",
"1",
"return result;",
"result",
"try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }",
"catch (IOException e) {\n throw new AssertionError(null, e);\n }",
"IOException e",
"{\n throw new AssertionError(null, e);\n }",
"throw new AssertionError(null, e);",
"new AssertionError(null, e)",
"{\n readLength = in.read(buffer);\n }",
"readLength = in.read(buffer)",
"readLength",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (readLength == -1) {\n return -1;\n }",
"readLength == -1",
"readLength",
"-1",
"1",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"point = 1",
"point",
"1",
"return buffer[0];",
"buffer[0]",
"buffer",
"0",
"private static boolean isPrintableCharExceptSpace(byte c) {\n return 33 <= c && c <= 126;\n }",
"isPrintableCharExceptSpace",
"{\n return 33 <= c && c <= 126;\n }",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"byte c",
"c",
"public char nextChar() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }",
"nextChar",
"{\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }",
"byte c = readByte();",
"c",
"readByte()",
"readByte",
"while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }",
"!(c == -1 || isPrintableCharExceptSpace(c))",
"(c == -1 || isPrintableCharExceptSpace(c))",
"c == -1",
"c",
"-1",
"1",
"isPrintableCharExceptSpace(c)",
"isPrintableCharExceptSpace",
"c",
"{\n c = readByte();\n }",
"c = readByte()",
"c",
"readByte()",
"readByte",
"if (c == -1) {\n throw new NoSuchElementException();\n }",
"c == -1",
"c",
"-1",
"1",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"return (char)c;",
"(char)c",
"public String next() {\n return next(16);\n }",
"next",
"{\n return next(16);\n }",
"return next(16);",
"next(16)",
"next",
"16",
"public String next(int n) {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }",
"next",
"{\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }",
"byte c = readByte();",
"c",
"readByte()",
"readByte",
"while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }",
"!(c == -1 || isPrintableCharExceptSpace(c))",
"(c == -1 || isPrintableCharExceptSpace(c))",
"c == -1",
"c",
"-1",
"1",
"isPrintableCharExceptSpace(c)",
"isPrintableCharExceptSpace",
"c",
"{\n c = readByte();\n }",
"c = readByte()",
"c",
"readByte()",
"readByte",
"if (c == -1) {\n throw new NoSuchElementException();\n }",
"c == -1",
"c",
"-1",
"1",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder b = new StringBuilder(n);",
"b",
"new StringBuilder(n)",
"do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));",
"c != -1 && isPrintableCharExceptSpace(c)",
"c != -1",
"c",
"-1",
"1",
"isPrintableCharExceptSpace(c)",
"isPrintableCharExceptSpace",
"c",
"{\n b.append((char)c);\n c = readByte();\n }",
"b.append((char)c)",
"b.append",
"b",
"(char)c",
"c = readByte()",
"c",
"readByte()",
"readByte",
"return b.toString();",
"b.toString()",
"b.toString",
"b",
"int n",
"n",
"public long nextLong() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }",
"nextLong",
"{\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }",
"byte c = readByte();",
"c",
"readByte()",
"readByte",
"while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }",
"!(c == -1 || isPrintableCharExceptSpace(c))",
"(c == -1 || isPrintableCharExceptSpace(c))",
"c == -1",
"c",
"-1",
"1",
"isPrintableCharExceptSpace(c)",
"isPrintableCharExceptSpace",
"c",
"{\n c = readByte();\n }",
"c = readByte()",
"c",
"readByte()",
"readByte",
"if (c == -1) {\n throw new NoSuchElementException();\n }",
"c == -1",
"c",
"-1",
"1",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"boolean minus = false;",
"minus",
"false",
"if (c == '-') {\n minus = true;\n c = readByte();\n }",
"c == '-'",
"c",
"'-'",
"{\n minus = true;\n c = readByte();\n }",
"minus = true",
"minus",
"true",
"c = readByte()",
"c",
"readByte()",
"readByte",
"long result = 0L;",
"result",
"0L",
"do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));",
"c != -1 && isPrintableCharExceptSpace(c)",
"c != -1",
"c",
"-1",
"1",
"isPrintableCharExceptSpace(c)",
"isPrintableCharExceptSpace",
"c",
"{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n }",
"if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"result = result * 10L + (c - '0')",
"result",
"result * 10L + (c - '0')",
"result * 10L",
"result",
"10L",
"(c - '0')",
"c",
"'0'",
"c = readByte()",
"c",
"readByte()",
"readByte",
"return minus ? -result : result;",
"minus ? -result : result",
"minus",
"-result",
"result",
"result",
"public int nextInt() {\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }",
"nextInt",
"{\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }",
"long n = nextLong();",
"n",
"nextLong()",
"nextLong",
"if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }",
"n < Integer.MIN_VALUE || n > Integer.MAX_VALUE",
"n < Integer.MIN_VALUE",
"n",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"n > Integer.MAX_VALUE",
"n",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"return (int)n;",
"(int)n",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public int[] nextIntArray(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }",
"nextIntArray",
"{\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }",
"int[] result = new int[n];",
"result",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n result[i] = nextInt();\n }",
"{\n result[i] = nextInt();\n }",
"result[i] = nextInt()",
"result[i]",
"result",
"i",
"nextInt()",
"nextInt",
"return result;",
"result",
"int n",
"n",
"public long[] nextLongArray(int n) {\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }",
"nextLongArray",
"{\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }",
"long[] result = new long[n];",
"result",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n result[i] = nextLong();\n }",
"{\n result[i] = nextLong();\n }",
"result[i] = nextLong()",
"result[i]",
"result",
"i",
"nextLong()",
"nextLong",
"return result;",
"result",
"int n",
"n",
"public char[] nextCharArray(int n) {\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }",
"nextCharArray",
"{\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }",
"char[] result = new char[n];",
"result",
"new char[n]",
"n",
"for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n result[i] = nextChar();\n }",
"{\n result[i] = nextChar();\n }",
"result[i] = nextChar()",
"result[i]",
"result",
"i",
"nextChar()",
"nextChar",
"return result;",
"result",
"int n",
"n",
"public char[][] next2dCharArray(int n, int m) {\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }",
"next2dCharArray",
"{\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }",
"char[][] result = new char[n][m];",
"result",
"new char[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }",
"{\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }",
"for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"{\n result[i][j] = nextChar();\n }",
"{\n result[i][j] = nextChar();\n }",
"result[i][j] = nextChar()",
"result[i][j]",
"result[i]",
"result",
"i",
"j",
"nextChar()",
"nextChar",
"return result;",
"result",
"int n",
"n",
"int m",
"m",
"public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }",
"nextVerticalIntArrays",
"{\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }",
"int[][] result = new int[arrayCount][arrayLength];",
"result",
"new int[arrayCount][arrayLength]",
"arrayCount",
"arrayLength",
"for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arrayLength",
"i",
"arrayLength",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }",
"{\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }",
"for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < arrayCount",
"j",
"arrayCount",
"j++",
"j++",
"j",
"{\n result[j][i] = nextInt();\n }",
"{\n result[j][i] = nextInt();\n }",
"result[j][i] = nextInt()",
"result[j][i]",
"result[j]",
"result",
"j",
"i",
"nextInt()",
"nextInt",
"return result;",
"result",
"int arrayCount",
"arrayCount",
"int arrayLength",
"arrayLength",
"public long[][] nextVerticalLongArrays(int arrayCount,\n int arrayLength) {\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }",
"nextVerticalLongArrays",
"{\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }",
"long[][] result = new long[arrayCount][arrayLength];",
"result",
"new long[arrayCount][arrayLength]",
"arrayCount",
"arrayLength",
"for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arrayLength",
"i",
"arrayLength",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }",
"{\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }",
"for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < arrayCount",
"j",
"arrayCount",
"j++",
"j++",
"j",
"{\n result[j][i] = nextLong();\n }",
"{\n result[j][i] = nextLong();\n }",
"result[j][i] = nextLong()",
"result[j][i]",
"result[j]",
"result",
"j",
"i",
"nextLong()",
"nextLong",
"return result;",
"result",
"int arrayCount",
"arrayCount",
"int arrayLength",
"arrayLength",
"public char[][] nextVerticalCharArrays(int arrayCount,\n int arrayLength) {\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }",
"nextVerticalCharArrays",
"{\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }",
"char[][] result = new char[arrayCount][arrayLength];",
"result",
"new char[arrayCount][arrayLength]",
"arrayCount",
"arrayLength",
"for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arrayLength",
"i",
"arrayLength",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }",
"{\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }",
"for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < arrayCount",
"j",
"arrayCount",
"j++",
"j++",
"j",
"{\n result[j][i] = nextChar();\n }",
"{\n result[j][i] = nextChar();\n }",
"result[j][i] = nextChar()",
"result[j][i]",
"result[j]",
"result",
"j",
"i",
"nextChar()",
"nextChar",
"return result;",
"result",
"int arrayCount",
"arrayCount",
"int arrayLength",
"arrayLength",
"static final class MyWriter extends PrintWriter {\n MyWriter(OutputStream out) {\n super(out);\n }\n public void joinAndPrintln(int[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(int[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(long[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(long[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(Iterable<?> iterable) {\n joinAndPrintln(iterable, \" \");\n }\n public void joinAndPrintln(Iterable<?> iterable, String delimiter) {\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }\n }",
"MyWriter",
"MyWriter(OutputStream out) {\n super(out);\n }",
"MyWriter",
"{\n super(out);\n }",
"super(out)",
"super",
"out",
"OutputStream out",
"out",
"public void joinAndPrintln(int[] x) {\n joinAndPrintln(x, \" \");\n }",
"joinAndPrintln",
"{\n joinAndPrintln(x, \" \");\n }",
"joinAndPrintln(x, \" \")",
"joinAndPrintln",
"x",
"\" \"",
"int[] x",
"x",
"public void joinAndPrintln(int[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }",
"joinAndPrintln",
"{\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }",
"StringBuilder b = new StringBuilder();",
"b",
"new StringBuilder()",
"if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }",
"x.length > 0",
"x.length",
"x",
"x.length",
"0",
"{\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }",
"b.append(x[0])",
"b.append",
"b",
"x[0]",
"x",
"0",
"for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < x.length",
"i",
"x.length",
"x",
"x.length",
"i++",
"i++",
"i",
"{\n b.append(delimiter).append(x[i]);\n }",
"{\n b.append(delimiter).append(x[i]);\n }",
"b.append(delimiter).append(x[i])",
"b.append(delimiter).append",
"b.append(delimiter)",
"b.append",
"b",
"delimiter",
"x[i]",
"x",
"i",
"println(b.toString())",
"println",
"b.toString()",
"b.toString",
"b",
"int[] x",
"x",
"String delimiter",
"delimiter",
"public void joinAndPrintln(long[] x) {\n joinAndPrintln(x, \" \");\n }",
"joinAndPrintln",
"{\n joinAndPrintln(x, \" \");\n }",
"joinAndPrintln(x, \" \")",
"joinAndPrintln",
"x",
"\" \"",
"long[] x",
"x",
"public void joinAndPrintln(long[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }",
"joinAndPrintln",
"{\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }",
"StringBuilder b = new StringBuilder();",
"b",
"new StringBuilder()",
"if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }",
"x.length > 0",
"x.length",
"x",
"x.length",
"0",
"{\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }",
"b.append(x[0])",
"b.append",
"b",
"x[0]",
"x",
"0",
"for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < x.length",
"i",
"x.length",
"x",
"x.length",
"i++",
"i++",
"i",
"{\n b.append(delimiter).append(x[i]);\n }",
"{\n b.append(delimiter).append(x[i]);\n }",
"b.append(delimiter).append(x[i])",
"b.append(delimiter).append",
"b.append(delimiter)",
"b.append",
"b",
"delimiter",
"x[i]",
"x",
"i",
"println(b.toString())",
"println",
"b.toString()",
"b.toString",
"b",
"long[] x",
"x",
"String delimiter",
"delimiter",
"public void joinAndPrintln(Iterable<?> iterable) {\n joinAndPrintln(iterable, \" \");\n }",
"joinAndPrintln",
"{\n joinAndPrintln(iterable, \" \");\n }",
"joinAndPrintln(iterable, \" \")",
"joinAndPrintln",
"iterable",
"\" \"",
"Iterable<?> iterable",
"iterable",
"public void joinAndPrintln(Iterable<?> iterable, String delimiter) {\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }",
"joinAndPrintln",
"{\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }",
"StringBuilder b = new StringBuilder();",
"b",
"new StringBuilder()",
"for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }",
"Iterator<?> i = iterable.iterator();",
"Iterator<?> i = iterable.iterator();",
"i",
"iterable.iterator()",
"iterable.iterator",
"iterable",
"i.hasNext()",
"i.hasNext",
"i",
"{\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }",
"{\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }",
"b.append(i.next())",
"b.append",
"b",
"i.next()",
"i.next",
"i",
"while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }",
"i.hasNext()",
"i.hasNext",
"i",
"{\n b.append(delimiter).append(i.next());\n }",
"b.append(delimiter).append(i.next())",
"b.append(delimiter).append",
"b.append(delimiter)",
"b.append",
"b",
"delimiter",
"i.next()",
"i.next",
"i",
"println(b.toString())",
"println",
"b.toString()",
"b.toString",
"b",
"Iterable<?> iterable",
"iterable",
"String delimiter",
"delimiter",
"PrintWriter",
"public class Main {\n static void solve(MyScanner in, MyWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n\t int[] a = in.nextIntArray(n);\n int ans =0;\n \n Arrays.sort(a);\n for(int i=0;i<k;i++) ans += a[i];\n\n out.println(ans);\n }\n\n public static void main(String[] args) {\n MyWriter w = new MyWriter(System.out);\n solve(new MyScanner(System.in), w);\n w.flush();\n }\n static final class MyScanner {\n static final int BUFFER_SIZE = 8192;\n private final InputStream in;\n private final byte[] buffer = new byte[BUFFER_SIZE];\n private int point;\n private int readLength;\n \n MyScanner(InputStream in) {\n this.in = in;\n }\n private byte readByte() {\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }\n private static boolean isPrintableCharExceptSpace(byte c) {\n return 33 <= c && c <= 126;\n }\n public char nextChar() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }\n public String next() {\n return next(16);\n }\n public String next(int n) {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }\n public long nextLong() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }\n public int nextInt() {\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n public int[] nextIntArray(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n public long[] nextLongArray(int n) {\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n public char[] nextCharArray(int n) {\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }\n public char[][] next2dCharArray(int n, int m) {\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }\n public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }\n public long[][] nextVerticalLongArrays(int arrayCount,\n int arrayLength) {\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }\n public char[][] nextVerticalCharArrays(int arrayCount,\n int arrayLength) {\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }\n }\n static final class MyWriter extends PrintWriter {\n MyWriter(OutputStream out) {\n super(out);\n }\n public void joinAndPrintln(int[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(int[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(long[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(long[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(Iterable<?> iterable) {\n joinAndPrintln(iterable, \" \");\n }\n public void joinAndPrintln(Iterable<?> iterable, String delimiter) {\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }\n }\n}",
"public class Main {\n static void solve(MyScanner in, MyWriter out) {\n int n = in.nextInt();\n int k = in.nextInt();\n\t int[] a = in.nextIntArray(n);\n int ans =0;\n \n Arrays.sort(a);\n for(int i=0;i<k;i++) ans += a[i];\n\n out.println(ans);\n }\n\n public static void main(String[] args) {\n MyWriter w = new MyWriter(System.out);\n solve(new MyScanner(System.in), w);\n w.flush();\n }\n static final class MyScanner {\n static final int BUFFER_SIZE = 8192;\n private final InputStream in;\n private final byte[] buffer = new byte[BUFFER_SIZE];\n private int point;\n private int readLength;\n \n MyScanner(InputStream in) {\n this.in = in;\n }\n private byte readByte() {\n if (point < readLength) {\n byte result = buffer[point];\n point += 1;\n return result;\n }\n try {\n readLength = in.read(buffer);\n } catch (IOException e) {\n throw new AssertionError(null, e);\n }\n if (readLength == -1) {\n return -1;\n }\n point = 1;\n return buffer[0];\n }\n private static boolean isPrintableCharExceptSpace(byte c) {\n return 33 <= c && c <= 126;\n }\n public char nextChar() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n return (char)c;\n }\n public String next() {\n return next(16);\n }\n public String next(int n) {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n StringBuilder b = new StringBuilder(n);\n do {\n b.append((char)c);\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return b.toString();\n }\n public long nextLong() {\n byte c = readByte();\n while (!(c == -1 || isPrintableCharExceptSpace(c))) {\n c = readByte();\n }\n if (c == -1) {\n throw new NoSuchElementException();\n }\n boolean minus = false;\n if (c == '-') {\n minus = true;\n c = readByte();\n }\n long result = 0L;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n result = result * 10L + (c - '0');\n c = readByte();\n } while (c != -1 && isPrintableCharExceptSpace(c));\n return minus ? -result : result;\n }\n public int nextInt() {\n long n = nextLong();\n if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {\n throw new InputMismatchException();\n }\n return (int)n;\n }\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n public int[] nextIntArray(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n public long[] nextLongArray(int n) {\n long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n public char[] nextCharArray(int n) {\n char[] result = new char[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextChar();\n }\n return result;\n }\n public char[][] next2dCharArray(int n, int m) {\n char[][] result = new char[n][m];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < m; j++) {\n result[i][j] = nextChar();\n }\n }\n return result;\n }\n public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {\n int[][] result = new int[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextInt();\n }\n }\n return result;\n }\n public long[][] nextVerticalLongArrays(int arrayCount,\n int arrayLength) {\n long[][] result = new long[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextLong();\n }\n }\n return result;\n }\n public char[][] nextVerticalCharArrays(int arrayCount,\n int arrayLength) {\n char[][] result = new char[arrayCount][arrayLength];\n for (int i = 0; i < arrayLength; i++) {\n for (int j = 0; j < arrayCount; j++) {\n result[j][i] = nextChar();\n }\n }\n return result;\n }\n }\n static final class MyWriter extends PrintWriter {\n MyWriter(OutputStream out) {\n super(out);\n }\n public void joinAndPrintln(int[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(int[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(long[] x) {\n joinAndPrintln(x, \" \");\n }\n public void joinAndPrintln(long[] x, String delimiter) {\n StringBuilder b = new StringBuilder();\n if (x.length > 0) {\n b.append(x[0]);\n for (int i = 1; i < x.length; i++) {\n b.append(delimiter).append(x[i]);\n }\n }\n println(b.toString());\n }\n public void joinAndPrintln(Iterable<?> iterable) {\n joinAndPrintln(iterable, \" \");\n }\n public void joinAndPrintln(Iterable<?> iterable, String delimiter) {\n StringBuilder b = new StringBuilder();\n for (Iterator<?> i = iterable.iterator(); i.hasNext();) {\n b.append(i.next());\n while (i.hasNext()) {\n b.append(delimiter).append(i.next());\n }\n }\n println(b.toString());\n }\n }\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.regex.Pattern;
import java.util.Arrays;
public class Main {
static void solve(MyScanner in, MyWriter out) {
int n = in.nextInt();
int k = in.nextInt();
int[] a = in.nextIntArray(n);
int ans =0;
Arrays.sort(a);
for(int i=0;i<k;i++) ans += a[i];
out.println(ans);
}
public static void main(String[] args) {
MyWriter w = new MyWriter(System.out);
solve(new MyScanner(System.in), w);
w.flush();
}
static final class MyScanner {
static final int BUFFER_SIZE = 8192;
private final InputStream in;
private final byte[] buffer = new byte[BUFFER_SIZE];
private int point;
private int readLength;
MyScanner(InputStream in) {
this.in = in;
}
private byte readByte() {
if (point < readLength) {
byte result = buffer[point];
point += 1;
return result;
}
try {
readLength = in.read(buffer);
} catch (IOException e) {
throw new AssertionError(null, e);
}
if (readLength == -1) {
return -1;
}
point = 1;
return buffer[0];
}
private static boolean isPrintableCharExceptSpace(byte c) {
return 33 <= c && c <= 126;
}
public char nextChar() {
byte c = readByte();
while (!(c == -1 || isPrintableCharExceptSpace(c))) {
c = readByte();
}
if (c == -1) {
throw new NoSuchElementException();
}
return (char)c;
}
public String next() {
return next(16);
}
public String next(int n) {
byte c = readByte();
while (!(c == -1 || isPrintableCharExceptSpace(c))) {
c = readByte();
}
if (c == -1) {
throw new NoSuchElementException();
}
StringBuilder b = new StringBuilder(n);
do {
b.append((char)c);
c = readByte();
} while (c != -1 && isPrintableCharExceptSpace(c));
return b.toString();
}
public long nextLong() {
byte c = readByte();
while (!(c == -1 || isPrintableCharExceptSpace(c))) {
c = readByte();
}
if (c == -1) {
throw new NoSuchElementException();
}
boolean minus = false;
if (c == '-') {
minus = true;
c = readByte();
}
long result = 0L;
do {
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
result = result * 10L + (c - '0');
c = readByte();
} while (c != -1 && isPrintableCharExceptSpace(c));
return minus ? -result : result;
}
public int nextInt() {
long n = nextLong();
if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) {
throw new InputMismatchException();
}
return (int)n;
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] nextIntArray(int n) {
int[] result = new int[n];
for (int i = 0; i < n; i++) {
result[i] = nextInt();
}
return result;
}
public long[] nextLongArray(int n) {
long[] result = new long[n];
for (int i = 0; i < n; i++) {
result[i] = nextLong();
}
return result;
}
public char[] nextCharArray(int n) {
char[] result = new char[n];
for (int i = 0; i < n; i++) {
result[i] = nextChar();
}
return result;
}
public char[][] next2dCharArray(int n, int m) {
char[][] result = new char[n][m];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
result[i][j] = nextChar();
}
}
return result;
}
public int[][] nextVerticalIntArrays(int arrayCount, int arrayLength) {
int[][] result = new int[arrayCount][arrayLength];
for (int i = 0; i < arrayLength; i++) {
for (int j = 0; j < arrayCount; j++) {
result[j][i] = nextInt();
}
}
return result;
}
public long[][] nextVerticalLongArrays(int arrayCount,
int arrayLength) {
long[][] result = new long[arrayCount][arrayLength];
for (int i = 0; i < arrayLength; i++) {
for (int j = 0; j < arrayCount; j++) {
result[j][i] = nextLong();
}
}
return result;
}
public char[][] nextVerticalCharArrays(int arrayCount,
int arrayLength) {
char[][] result = new char[arrayCount][arrayLength];
for (int i = 0; i < arrayLength; i++) {
for (int j = 0; j < arrayCount; j++) {
result[j][i] = nextChar();
}
}
return result;
}
}
static final class MyWriter extends PrintWriter {
MyWriter(OutputStream out) {
super(out);
}
public void joinAndPrintln(int[] x) {
joinAndPrintln(x, " ");
}
public void joinAndPrintln(int[] x, String delimiter) {
StringBuilder b = new StringBuilder();
if (x.length > 0) {
b.append(x[0]);
for (int i = 1; i < x.length; i++) {
b.append(delimiter).append(x[i]);
}
}
println(b.toString());
}
public void joinAndPrintln(long[] x) {
joinAndPrintln(x, " ");
}
public void joinAndPrintln(long[] x, String delimiter) {
StringBuilder b = new StringBuilder();
if (x.length > 0) {
b.append(x[0]);
for (int i = 1; i < x.length; i++) {
b.append(delimiter).append(x[i]);
}
}
println(b.toString());
}
public void joinAndPrintln(Iterable<?> iterable) {
joinAndPrintln(iterable, " ");
}
public void joinAndPrintln(Iterable<?> iterable, String delimiter) {
StringBuilder b = new StringBuilder();
for (Iterator<?> i = iterable.iterator(); i.hasNext();) {
b.append(i.next());
while (i.hasNext()) {
b.append(delimiter).append(i.next());
}
}
println(b.toString());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
97,
11
],
[
97,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
14,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
14,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
14,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
12,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
]
| [
"import java.util.List;\nimport java.util.Scanner;\nimport java.util.Arrays;\npublic class Main {\n\tpublic static void main(String[] args) {\n Scanner sn = new Scanner(System.in);\n int cnt = Integer.parseInt(sn.next());\n int y = Integer.parseInt(sn.next());\n int[] list = new int[cnt];\n int sum = 0;\n for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }\n Arrays.sort(list);\n for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }\n System.out.println(sum);\n\t}\n}\n",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sn = new Scanner(System.in);\n int cnt = Integer.parseInt(sn.next());\n int y = Integer.parseInt(sn.next());\n int[] list = new int[cnt];\n int sum = 0;\n for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }\n Arrays.sort(list);\n for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }\n System.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n Scanner sn = new Scanner(System.in);\n int cnt = Integer.parseInt(sn.next());\n int y = Integer.parseInt(sn.next());\n int[] list = new int[cnt];\n int sum = 0;\n for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }\n Arrays.sort(list);\n for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }\n System.out.println(sum);\n\t}",
"main",
"{\n Scanner sn = new Scanner(System.in);\n int cnt = Integer.parseInt(sn.next());\n int y = Integer.parseInt(sn.next());\n int[] list = new int[cnt];\n int sum = 0;\n for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }\n Arrays.sort(list);\n for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }\n System.out.println(sum);\n\t}",
"Scanner sn = new Scanner(System.in);",
"sn",
"new Scanner(System.in)",
"int cnt = Integer.parseInt(sn.next());",
"cnt",
"Integer.parseInt(sn.next())",
"Integer.parseInt",
"Integer",
"sn.next()",
"sn.next",
"sn",
"int y = Integer.parseInt(sn.next());",
"y",
"Integer.parseInt(sn.next())",
"Integer.parseInt",
"Integer",
"sn.next()",
"sn.next",
"sn",
"int[] list = new int[cnt];",
"list",
"new int[cnt]",
"cnt",
"int sum = 0;",
"sum",
"0",
"for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cnt",
"i",
"cnt",
"i++",
"i++",
"i",
"{\n list[i] = Integer.parseInt(sn.next());\n }",
"{\n list[i] = Integer.parseInt(sn.next());\n }",
"list[i] = Integer.parseInt(sn.next())",
"list[i]",
"list",
"i",
"Integer.parseInt(sn.next())",
"Integer.parseInt",
"Integer",
"sn.next()",
"sn.next",
"sn",
"Arrays.sort(list)",
"Arrays.sort",
"Arrays",
"list",
"for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }",
"int l = 0;",
"int l = 0;",
"l",
"0",
"l < y",
"l",
"y",
"l++",
"l++",
"l",
"{\n sum = sum + list[l];\n }",
"{\n sum = sum + list[l];\n }",
"sum = sum + list[l]",
"sum",
"sum + list[l]",
"sum",
"list[l]",
"list",
"l",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sn = new Scanner(System.in);\n int cnt = Integer.parseInt(sn.next());\n int y = Integer.parseInt(sn.next());\n int[] list = new int[cnt];\n int sum = 0;\n for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }\n Arrays.sort(list);\n for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }\n System.out.println(sum);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sn = new Scanner(System.in);\n int cnt = Integer.parseInt(sn.next());\n int y = Integer.parseInt(sn.next());\n int[] list = new int[cnt];\n int sum = 0;\n for ( int i = 0; i < cnt ; i++){\n list[i] = Integer.parseInt(sn.next());\n }\n Arrays.sort(list);\n for ( int l = 0; l < y ; l++){\n sum = sum + list[l];\n }\n System.out.println(sum);\n\t}\n}",
"Main"
]
| import java.util.List;
import java.util.Scanner;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner sn = new Scanner(System.in);
int cnt = Integer.parseInt(sn.next());
int y = Integer.parseInt(sn.next());
int[] list = new int[cnt];
int sum = 0;
for ( int i = 0; i < cnt ; i++){
list[i] = Integer.parseInt(sn.next());
}
Arrays.sort(list);
for ( int l = 0; l < y ; l++){
sum = sum + list[l];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n List<Integer> p = new ArrayList<>();\n \n \tfor(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }\n \n \tCollections.sort(p);\n \n \tint result = 0;\n \n \tfor(int i=0; i < k; i++){\n \tresult += p.get(i);\n }\n \n \tSystem.out.print(result);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n List<Integer> p = new ArrayList<>();\n \n \tfor(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }\n \n \tCollections.sort(p);\n \n \tint result = 0;\n \n \tfor(int i=0; i < k; i++){\n \tresult += p.get(i);\n }\n \n \tSystem.out.print(result);\n }\n}",
"Main",
"public static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n List<Integer> p = new ArrayList<>();\n \n \tfor(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }\n \n \tCollections.sort(p);\n \n \tint result = 0;\n \n \tfor(int i=0; i < k; i++){\n \tresult += p.get(i);\n }\n \n \tSystem.out.print(result);\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n List<Integer> p = new ArrayList<>();\n \n \tfor(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }\n \n \tCollections.sort(p);\n \n \tint result = 0;\n \n \tfor(int i=0; i < k; i++){\n \tresult += p.get(i);\n }\n \n \tSystem.out.print(result);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> p = new ArrayList<>();",
"p",
"new ArrayList<>()",
"for(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tp.add(sc.nextInt());\n }",
"{\n \tp.add(sc.nextInt());\n }",
"p.add(sc.nextInt())",
"p.add",
"p",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(p)",
"Collections.sort",
"Collections",
"p",
"int result = 0;",
"result",
"0",
"for(int i=0; i < k; i++){\n \tresult += p.get(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \tresult += p.get(i);\n }",
"{\n \tresult += p.get(i);\n }",
"result += p.get(i)",
"result",
"p.get(i)",
"p.get",
"p",
"i",
"System.out.print(result)",
"System.out.print",
"System.out",
"System",
"System.out",
"result",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n List<Integer> p = new ArrayList<>();\n \n \tfor(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }\n \n \tCollections.sort(p);\n \n \tint result = 0;\n \n \tfor(int i=0; i < k; i++){\n \tresult += p.get(i);\n }\n \n \tSystem.out.print(result);\n }\n}",
"public class Main{\n\tpublic static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n List<Integer> p = new ArrayList<>();\n \n \tfor(int i = 0; i < n; i++){\n \tp.add(sc.nextInt());\n }\n \n \tCollections.sort(p);\n \n \tint result = 0;\n \n \tfor(int i=0; i < k; i++){\n \tresult += p.get(i);\n }\n \n \tSystem.out.print(result);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
List<Integer> p = new ArrayList<>();
for(int i = 0; i < n; i++){
p.add(sc.nextInt());
}
Collections.sort(p);
int result = 0;
for(int i=0; i < k; i++){
result += p.get(i);
}
System.out.print(result);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\t\n\t\tint[] list = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint total = 0;\n\t\tfor(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}\n\t\tSystem.out.print(total);\n\t}\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\t\n\t\tint[] list = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint total = 0;\n\t\tfor(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}\n\t\tSystem.out.print(total);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\t\n\t\tint[] list = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint total = 0;\n\t\tfor(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}\n\t\tSystem.out.print(total);\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\t\n\t\tint[] list = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint total = 0;\n\t\tfor(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}\n\t\tSystem.out.print(total);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] list = new int[n];",
"list",
"new int[n]",
"n",
"for(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tlist[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tlist[i] = scan.nextInt();\n\t\t}",
"list[i] = scan.nextInt()",
"list[i]",
"list",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"Arrays.sort(list)",
"Arrays.sort",
"Arrays",
"list",
"int total = 0;",
"total",
"0",
"for(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\ttotal += list[i];\n\t\t}",
"{\n\t\t\ttotal += list[i];\n\t\t}",
"total += list[i]",
"total",
"list[i]",
"list",
"i",
"System.out.print(total)",
"System.out.print",
"System.out",
"System",
"System.out",
"total",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\t\n\t\tint[] list = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint total = 0;\n\t\tfor(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}\n\t\tSystem.out.print(total);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\t\n\t\tint[] list = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tlist[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(list);\n\t\tint total = 0;\n\t\tfor(int i = 0; i<k; i++) {\n\t\t\ttotal += list[i];\n\t\t}\n\t\tSystem.out.print(total);\n\t}\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int[] list = new int[n];
for(int i = 0; i < n; i++) {
list[i] = scan.nextInt();
}
Arrays.sort(list);
int total = 0;
for(int i = 0; i<k; i++) {
total += list[i];
}
System.out.print(total);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
85,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
11,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
9,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\n\t\tScanner in =new Scanner(System.in);\n\t\tint n=in.nextInt(),k=in.nextInt();\n\t\t\t\n\t\tint[] a = new int[n];\n\t\t\t\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(a);\n\t\tint sum = 0;\n\t\tfor(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\n\t\tScanner in =new Scanner(System.in);\n\t\tint n=in.nextInt(),k=in.nextInt();\n\t\t\t\n\t\tint[] a = new int[n];\n\t\t\t\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(a);\n\t\tint sum = 0;\n\t\tfor(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\n\t\tScanner in =new Scanner(System.in);\n\t\tint n=in.nextInt(),k=in.nextInt();\n\t\t\t\n\t\tint[] a = new int[n];\n\t\t\t\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(a);\n\t\tint sum = 0;\n\t\tfor(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}",
"main",
"{\n\t\n\t\tScanner in =new Scanner(System.in);\n\t\tint n=in.nextInt(),k=in.nextInt();\n\t\t\t\n\t\tint[] a = new int[n];\n\t\t\t\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(a);\n\t\tint sum = 0;\n\t\tfor(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}",
"Scanner in =new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n=in.nextInt()",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"k=in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\ta[i] = in.nextInt();\n\t\t}",
"{\n\t\t\t\ta[i] = in.nextInt();\n\t\t}",
"a[i] = in.nextInt()",
"a[i]",
"a",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int sum = 0;",
"sum",
"0",
"for(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tsum = sum+a[i];\n\t\t}",
"{\n\t\t\tsum = sum+a[i];\n\t\t}",
"sum = sum+a[i]",
"sum",
"sum+a[i]",
"sum",
"a[i]",
"a",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\n\t\tScanner in =new Scanner(System.in);\n\t\tint n=in.nextInt(),k=in.nextInt();\n\t\t\t\n\t\tint[] a = new int[n];\n\t\t\t\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(a);\n\t\tint sum = 0;\n\t\tfor(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\n\t\tScanner in =new Scanner(System.in);\n\t\tint n=in.nextInt(),k=in.nextInt();\n\t\t\t\n\t\tint[] a = new int[n];\n\t\t\t\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tArrays.sort(a);\n\t\tint sum = 0;\n\t\tfor(int i = 0;i<k;i++) {\n\t\t\tsum = sum+a[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
int n=in.nextInt(),k=in.nextInt();
int[] a = new int[n];
for(int i = 0;i<n;i++) {
a[i] = in.nextInt();
}
Arrays.sort(a);
int sum = 0;
for(int i = 0;i<k;i++) {
sum = sum+a[i];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
13,
0,
13,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
214,
8
],
[
214,
9
],
[
9,
10
],
[
9,
11
],
[
214,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
14,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
14,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
14,
50
],
[
50,
51
],
[
50,
52
],
[
14,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
14,
71
],
[
71,
72
],
[
71,
73
],
[
12,
74
],
[
74,
75
],
[
214,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
214,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
94,
95
],
[
214,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
214,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
214,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
120,
121
],
[
121,
122
],
[
214,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
123,
140
],
[
140,
141
],
[
214,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
142,
151
],
[
151,
152
],
[
214,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
162,
164
],
[
159,
165
],
[
158,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
170,
172
],
[
155,
173
],
[
173,
174
],
[
153,
175
],
[
175,
176
],
[
153,
177
],
[
177,
178
],
[
214,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
181,
184
],
[
184,
185
],
[
184,
186
],
[
181,
187
],
[
187,
188
],
[
187,
189
],
[
181,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
194,
196
],
[
191,
197
],
[
190,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
202,
204
],
[
181,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
179,
209
],
[
209,
210
],
[
179,
211
],
[
211,
212
],
[
0,
213
],
[
213,
214
],
[
213,
215
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\npublic class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n = nextInt();\n int k = nextInt();\n int[] arr = new int[n];\n\n for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for(int i=0;i<k;i++){\n sum += arr[i];\n }\n print(sum);\n }\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n //print\n public static void print(Object a){\n System.out.println(a);\n }\n\n\n //gcd\n public static int gcd (int a, int b){\n int tmp;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return b;\n }\n\n\n //lcm\n public static int lcm(int a,int b){\n int tmp;\n long c = a;\n c *= b;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return (int)(c/b);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n = nextInt();\n int k = nextInt();\n int[] arr = new int[n];\n\n for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for(int i=0;i<k;i++){\n sum += arr[i];\n }\n print(sum);\n }\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n //print\n public static void print(Object a){\n System.out.println(a);\n }\n\n\n //gcd\n public static int gcd (int a, int b){\n int tmp;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return b;\n }\n\n\n //lcm\n public static int lcm(int a,int b){\n int tmp;\n long c = a;\n c *= b;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return (int)(c/b);\n }\n}",
"Main",
"public static Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"public static void main(String[]args){\n int n = nextInt();\n int k = nextInt();\n int[] arr = new int[n];\n\n for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for(int i=0;i<k;i++){\n sum += arr[i];\n }\n print(sum);\n }",
"main",
"{\n int n = nextInt();\n int k = nextInt();\n int[] arr = new int[n];\n\n for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for(int i=0;i<k;i++){\n sum += arr[i];\n }\n print(sum);\n }",
"int n = nextInt();",
"n",
"nextInt()",
"nextInt",
"int k = nextInt();",
"k",
"nextInt()",
"nextInt",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextInt();\n }",
"{\n arr[i] = nextInt();\n }",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int sum = 0;",
"sum",
"0",
"for(int i=0;i<k;i++){\n sum += arr[i];\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n sum += arr[i];\n }",
"{\n sum += arr[i];\n }",
"sum += arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"print(sum)",
"print",
"sum",
"String[]args",
"args",
"public static int nextInt(){\n return Integer.parseInt(scan.next());\n }",
"nextInt",
"{\n return Integer.parseInt(scan.next());\n }",
"return Integer.parseInt(scan.next());",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"public static long nextLong(){\n return Long.parseLong(scan.next());\n }",
"nextLong",
"{\n return Long.parseLong(scan.next());\n }",
"return Long.parseLong(scan.next());",
"Long.parseLong(scan.next())",
"Long.parseLong",
"Long",
"scan.next()",
"scan.next",
"scan",
"public static String next(){\n return scan.next();\n }",
"next",
"{\n return scan.next();\n }",
"return scan.next();",
"scan.next()",
"scan.next",
"scan",
"public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }",
"nextDouble",
"{\n return Double.parseDouble(scan.next());\n }",
"return Double.parseDouble(scan.next());",
"Double.parseDouble(scan.next())",
"Double.parseDouble",
"Double",
"scan.next()",
"scan.next",
"scan",
"public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }",
"nextFloat",
"{\n return Float.parseFloat(scan.next());\n }",
"return Float.parseFloat(scan.next());",
"Float.parseFloat(scan.next())",
"Float.parseFloat",
"Float",
"scan.next()",
"scan.next",
"scan",
"//Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"yesNo",
"{\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"flag",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"boolean flag",
"flag",
"//print\n public static void print(Object a){\n System.out.println(a);\n }",
"print",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"Object a",
"a",
"//gcd\n public static int gcd (int a, int b){\n int tmp;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return b;\n }",
"gcd",
"{\n int tmp;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return b;\n }",
"int tmp;",
"tmp",
"while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }",
"(tmp = a%b) != 0",
"(tmp = a%b)",
"tmp",
"a%b",
"a",
"b",
"0",
"{\n a = b;\n b = tmp;\n }",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"//lcm\n public static int lcm(int a,int b){\n int tmp;\n long c = a;\n c *= b;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return (int)(c/b);\n }",
"lcm",
"{\n int tmp;\n long c = a;\n c *= b;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return (int)(c/b);\n }",
"int tmp;",
"tmp",
"long c = a;",
"c",
"a",
"c *= b",
"c",
"b",
"while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }",
"(tmp = a%b) != 0",
"(tmp = a%b)",
"tmp",
"a%b",
"a",
"b",
"0",
"{\n a = b;\n b = tmp;\n }",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"return (int)(c/b);",
"(int)(c/b)",
"c",
"b",
"int a",
"a",
"int b",
"b",
"public class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n = nextInt();\n int k = nextInt();\n int[] arr = new int[n];\n\n for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for(int i=0;i<k;i++){\n sum += arr[i];\n }\n print(sum);\n }\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n //print\n public static void print(Object a){\n System.out.println(a);\n }\n\n\n //gcd\n public static int gcd (int a, int b){\n int tmp;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return b;\n }\n\n\n //lcm\n public static int lcm(int a,int b){\n int tmp;\n long c = a;\n c *= b;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return (int)(c/b);\n }\n}",
"public class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n = nextInt();\n int k = nextInt();\n int[] arr = new int[n];\n\n for(int i=0;i<n;i++){\n arr[i] = nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for(int i=0;i<k;i++){\n sum += arr[i];\n }\n print(sum);\n }\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n //print\n public static void print(Object a){\n System.out.println(a);\n }\n\n\n //gcd\n public static int gcd (int a, int b){\n int tmp;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return b;\n }\n\n\n //lcm\n public static int lcm(int a,int b){\n int tmp;\n long c = a;\n c *= b;\n while((tmp = a%b) != 0){\n a = b;\n b = tmp;\n }\n return (int)(c/b);\n }\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
public class Main{
public static Scanner scan = new Scanner(System.in);
public static void main(String[]args){
int n = nextInt();
int k = nextInt();
int[] arr = new int[n];
for(int i=0;i<n;i++){
arr[i] = nextInt();
}
Arrays.sort(arr);
int sum = 0;
for(int i=0;i<k;i++){
sum += arr[i];
}
print(sum);
}
public static int nextInt(){
return Integer.parseInt(scan.next());
}
public static long nextLong(){
return Long.parseLong(scan.next());
}
public static String next(){
return scan.next();
}
public static double nextDouble(){
return Double.parseDouble(scan.next());
}
public static float nextFloat(){
return Float.parseFloat(scan.next());
}
//Yes or No
public static void yesNo(boolean flag){
if(flag) System.out.println("Yes");
else System.out.println("No");
}
//print
public static void print(Object a){
System.out.println(a);
}
//gcd
public static int gcd (int a, int b){
int tmp;
while((tmp = a%b) != 0){
a = b;
b = tmp;
}
return b;
}
//lcm
public static int lcm(int a,int b){
int tmp;
long c = a;
c *= b;
while((tmp = a%b) != 0){
a = b;
b = tmp;
}
return (int)(c/b);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
17,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
17,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
17,
66
],
[
66,
67
],
[
66,
68
],
[
17,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
17,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
15,
94
],
[
94,
95
]
]
| [
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tList<Integer> arr = new ArrayList();\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}\n\t\tCollections.sort(arr);\n\n\t\tint totalMin =0;\n\t\tfor(int i=0;i<K;i++) {\n\t\t\ttotalMin+= arr.get(i);\n\t\t}\n\n\t\tSystem.out.println(totalMin);\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tList<Integer> arr = new ArrayList();\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}\n\t\tCollections.sort(arr);\n\n\t\tint totalMin =0;\n\t\tfor(int i=0;i<K;i++) {\n\t\t\ttotalMin+= arr.get(i);\n\t\t}\n\n\t\tSystem.out.println(totalMin);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tList<Integer> arr = new ArrayList();\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}\n\t\tCollections.sort(arr);\n\n\t\tint totalMin =0;\n\t\tfor(int i=0;i<K;i++) {\n\t\t\ttotalMin+= arr.get(i);\n\t\t}\n\n\t\tSystem.out.println(totalMin);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tList<Integer> arr = new ArrayList();\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}\n\t\tCollections.sort(arr);\n\n\t\tint totalMin =0;\n\t\tfor(int i=0;i<K;i++) {\n\t\t\ttotalMin+= arr.get(i);\n\t\t}\n\n\t\tSystem.out.println(totalMin);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = Integer.parseInt(sc.next());",
"N",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int K = Integer.parseInt(sc.next());",
"K",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"List<Integer> arr = new ArrayList();",
"arr",
"new ArrayList()",
"for(int i=0;i<N;i++) {\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}",
"{\n\t\t\tarr.add(Integer.parseInt(sc.next()));\n\t\t}",
"arr.add(Integer.parseInt(sc.next()))",
"arr.add",
"arr",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Collections.sort(arr)",
"Collections.sort",
"Collections",
"arr",
"int totalMin =0;",
"totalMin",
"0",
"for(int i=0;i<K;i++) {\n\t\t\ttotalMin+= arr.get(i);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\ttotalMin+= arr.get(i);\n\t\t}",
"{\n\t\t\ttotalMin+= arr.get(i);\n\t\t}",
"totalMin+= arr.get(i)",
"totalMin",
"arr.get(i)",
"arr.get",
"arr",
"i",
"System.out.println(totalMin)",
"System.out.println",
"System.out",
"System",
"System.out",
"totalMin",
"String[] args",
"args"
]
| import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int K = Integer.parseInt(sc.next());
List<Integer> arr = new ArrayList();
for(int i=0;i<N;i++) {
arr.add(Integer.parseInt(sc.next()));
}
Collections.sort(arr);
int totalMin =0;
for(int i=0;i<K;i++) {
totalMin+= arr.get(i);
}
System.out.println(totalMin);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
12,
13,
30,
4,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
13,
4,
18,
13,
2,
18,
13,
13,
13,
4,
13,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
294,
35
],
[
294,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
38,
49
],
[
49,
50
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
38,
55
],
[
55,
56
],
[
55,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
58,
63
],
[
38,
64
],
[
64,
65
],
[
65,
66
],
[
36,
67
],
[
67,
68
],
[
294,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
73,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
73,
94
],
[
94,
95
],
[
94,
96
],
[
73,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
97,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
73,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
71,
119
],
[
119,
120
],
[
71,
121
],
[
121,
122
],
[
71,
123
],
[
123,
124
],
[
294,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
125,
129
],
[
129,
130
],
[
125,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
137,
139
],
[
131,
140
],
[
140,
141
],
[
125,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
145,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
155,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
144,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
125,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
176,
177
],
[
125,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
185,
190
],
[
190,
191
],
[
190,
192
],
[
185,
193
],
[
193,
194
],
[
194,
195
],
[
185,
196
],
[
197,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
180,
204
],
[
204,
205
],
[
178,
206
],
[
206,
207
],
[
294,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
216
],
[
216,
217
],
[
217,
218
],
[
216,
219
],
[
210,
220
],
[
220,
221
],
[
208,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
228,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
228,
240
],
[
240,
241
],
[
241,
242
],
[
228,
243
],
[
244,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
249,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
244,
257
],
[
257,
258
],
[
257,
259
],
[
257,
260
],
[
257,
261
],
[
222,
262
],
[
262,
263
],
[
208,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
269,
271
],
[
266,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
276
],
[
276,
277
],
[
276,
278
],
[
266,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
264,
284
],
[
284,
285
],
[
264,
286
],
[
286,
287
],
[
264,
288
],
[
288,
289
],
[
208,
290
],
[
290,
291
],
[
290,
292
],
[
0,
293
],
[
293,
294
],
[
293,
295
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.util.Random;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author AnandOza\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readIntArray(int n) {\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }\n\n }\n\n static class Util {\n public static void safeSort(int[] x) {\n shuffle(x);\n Arrays.sort(x);\n }\n\n public static void shuffle(int[] x) {\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }\n\n public static void swap(int[] x, int i, int j) {\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }\n\n private Util() {\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Random;",
"Random",
"java.util",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readIntArray(int n) {\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }\n\n }\n\n static class Util {\n public static void safeSort(int[] x) {\n shuffle(x);\n Arrays.sort(x);\n }\n\n public static void shuffle(int[] x) {\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }\n\n public static void swap(int[] x, int i, int j) {\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }\n\n private Util() {\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BMixJuice solver = new BMixJuice();",
"solver",
"new BMixJuice()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BMixJuice {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }\n\n }",
"BMixJuice",
"public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }",
"solve",
"{\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }",
"int n = in.nextInt()",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int[] p = in.readIntArray(n);",
"p",
"in.readIntArray(n)",
"in.readIntArray",
"in",
"n",
"Util.safeSort(p)",
"Util.safeSort",
"Util",
"p",
"long answer = 0;",
"answer",
"0",
"for (int i = 0; i < k; i++) {\n answer += p[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n answer += p[i];\n }",
"{\n answer += p[i];\n }",
"answer += p[i]",
"answer",
"p[i]",
"p",
"i",
"out.println(answer)",
"out.println",
"out",
"answer",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"PrintWriter out",
"out",
"static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readIntArray(int n) {\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }\n\n }",
"InputReader",
"public BufferedReader reader;",
"reader",
"public StringTokenizer tokenizer;",
"tokenizer",
"public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"InputReader",
"{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(stream), 32768)",
"reader",
"new BufferedReader(new InputStreamReader(stream), 32768)",
"tokenizer = null",
"tokenizer",
"null",
"InputStream stream",
"stream",
"public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public int[] readIntArray(int n) {\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }",
"readIntArray",
"{\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }",
"int[] x = new int[n];",
"x",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n x[i] = nextInt();\n }",
"{\n x[i] = nextInt();\n }",
"x[i] = nextInt()",
"x[i]",
"x",
"i",
"nextInt()",
"nextInt",
"return x;",
"x",
"int n",
"n",
"static class Util {\n public static void safeSort(int[] x) {\n shuffle(x);\n Arrays.sort(x);\n }\n\n public static void shuffle(int[] x) {\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }\n\n public static void swap(int[] x, int i, int j) {\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }\n\n private Util() {\n }\n\n }",
"Util",
"public static void safeSort(int[] x) {\n shuffle(x);\n Arrays.sort(x);\n }",
"safeSort",
"{\n shuffle(x);\n Arrays.sort(x);\n }",
"shuffle(x)",
"shuffle",
"x",
"Arrays.sort(x)",
"Arrays.sort",
"Arrays",
"x",
"int[] x",
"x",
"public static void shuffle(int[] x) {\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }",
"shuffle",
"{\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }",
"Random r = new Random();",
"r",
"new Random()",
"for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= x.length - 2",
"i",
"x.length - 2",
"x.length",
"x",
"x.length",
"2",
"i++",
"i++",
"i",
"{\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }",
"{\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }",
"int j = i + r.nextInt(x.length - i);",
"j",
"i + r.nextInt(x.length - i)",
"i",
"r.nextInt(x.length - i)",
"r.nextInt",
"r",
"x.length - i",
"x.length",
"x",
"x.length",
"i",
"swap(x, i, j)",
"swap",
"x",
"i",
"j",
"int[] x",
"x",
"public static void swap(int[] x, int i, int j) {\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }",
"swap",
"{\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }",
"int t = x[i];",
"t",
"x[i]",
"x",
"i",
"x[i] = x[j]",
"x[i]",
"x",
"i",
"x[j]",
"x",
"j",
"x[j] = t",
"x[j]",
"x",
"j",
"t",
"int[] x",
"x",
"int i",
"i",
"int j",
"j",
"private Util() {\n }",
"Util",
"{\n }",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readIntArray(int n) {\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }\n\n }\n\n static class Util {\n public static void safeSort(int[] x) {\n shuffle(x);\n Arrays.sort(x);\n }\n\n public static void shuffle(int[] x) {\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }\n\n public static void swap(int[] x, int i, int j) {\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }\n\n private Util() {\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BMixJuice solver = new BMixJuice();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BMixJuice {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt(), k = in.nextInt();\n int[] p = in.readIntArray(n);\n\n Util.safeSort(p);\n\n long answer = 0;\n for (int i = 0; i < k; i++) {\n answer += p[i];\n }\n\n out.println(answer);\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readIntArray(int n) {\n int[] x = new int[n];\n for (int i = 0; i < n; i++) {\n x[i] = nextInt();\n }\n return x;\n }\n\n }\n\n static class Util {\n public static void safeSort(int[] x) {\n shuffle(x);\n Arrays.sort(x);\n }\n\n public static void shuffle(int[] x) {\n Random r = new Random();\n\n for (int i = 0; i <= x.length - 2; i++) {\n int j = i + r.nextInt(x.length - i);\n swap(x, i, j);\n }\n }\n\n public static void swap(int[] x, int i, int j) {\n int t = x[i];\n x[i] = x[j];\n x[j] = t;\n }\n\n private Util() {\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.Random;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author AnandOza
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BMixJuice solver = new BMixJuice();
solver.solve(1, in, out);
out.close();
}
static class BMixJuice {
public void solve(int testNumber, InputReader in, PrintWriter out) {
int n = in.nextInt(), k = in.nextInt();
int[] p = in.readIntArray(n);
Util.safeSort(p);
long answer = 0;
for (int i = 0; i < k; i++) {
answer += p[i];
}
out.println(answer);
}
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public int[] readIntArray(int n) {
int[] x = new int[n];
for (int i = 0; i < n; i++) {
x[i] = nextInt();
}
return x;
}
}
static class Util {
public static void safeSort(int[] x) {
shuffle(x);
Arrays.sort(x);
}
public static void shuffle(int[] x) {
Random r = new Random();
for (int i = 0; i <= x.length - 2; i++) {
int j = i + r.nextInt(x.length - i);
swap(x, i, j);
}
}
public static void swap(int[] x, int i, int j) {
int t = x[i];
x[i] = x[j];
x[j] = t;
}
private Util() {
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
18,
13,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
120,
8
],
[
120,
9
],
[
9,
10
],
[
9,
11
],
[
120,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
120,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
21,
25
],
[
17,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
120,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
34,
38
],
[
30,
39
],
[
39,
40
],
[
30,
41
],
[
41,
42
],
[
120,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
45,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
45,
59
],
[
59,
60
],
[
59,
61
],
[
45,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
45,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
45,
87
],
[
87,
88
],
[
87,
89
],
[
45,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
90,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
45,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
45,
114
],
[
114,
115
],
[
115,
116
],
[
43,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic long mod = 1000000007;\n\tstatic long INF = Long.MAX_VALUE;\n\n\tstatic long chmin(long a, long b) {\n\t\treturn Math.min(a, b);\n\t}\n\n\tstatic long chmax(long a, long b) {\n\t\treturn Math.max(a, b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// AtCoder_B\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint P[] = new int[N];\n\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(P);\n\n\t\tint ans = 0;\n\t\tfor(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t // Scannerクラスのインスタンスをクローズ\n\t\tsc.close();\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic long mod = 1000000007;\n\tstatic long INF = Long.MAX_VALUE;\n\n\tstatic long chmin(long a, long b) {\n\t\treturn Math.min(a, b);\n\t}\n\n\tstatic long chmax(long a, long b) {\n\t\treturn Math.max(a, b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// AtCoder_B\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint P[] = new int[N];\n\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(P);\n\n\t\tint ans = 0;\n\t\tfor(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t // Scannerクラスのインスタンスをクローズ\n\t\tsc.close();\n\t}\n}",
"Main",
"static long mod = 1000000007;",
"mod",
"1000000007",
"static long INF = Long.MAX_VALUE;",
"INF",
"Long.MAX_VALUE",
"Long",
"Long.MAX_VALUE",
"static long chmin(long a, long b) {\n\t\treturn Math.min(a, b);\n\t}",
"chmin",
"{\n\t\treturn Math.min(a, b);\n\t}",
"return Math.min(a, b);",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static long chmax(long a, long b) {\n\t\treturn Math.max(a, b);\n\t}",
"chmax",
"{\n\t\treturn Math.max(a, b);\n\t}",
"return Math.max(a, b);",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public static void main(String[] args) {\n\t\t// AtCoder_B\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint P[] = new int[N];\n\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(P);\n\n\t\tint ans = 0;\n\t\tfor(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t // Scannerクラスのインスタンスをクローズ\n\t\tsc.close();\n\t}",
"main",
"{\n\t\t// AtCoder_B\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint P[] = new int[N];\n\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(P);\n\n\t\tint ans = 0;\n\t\tfor(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t // Scannerクラスのインスタンスをクローズ\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int P[] = new int[N];",
"P",
"new int[N]",
"N",
"for(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tP[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tP[i] = sc.nextInt();\n\t\t}",
"P[i] = sc.nextInt()",
"P[i]",
"P",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(P)",
"Arrays.sort",
"Arrays",
"P",
"int ans = 0;",
"ans",
"0",
"for(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tans += P[i];\n\t\t}",
"{\n\t\t\tans += P[i];\n\t\t}",
"ans += P[i]",
"ans",
"P[i]",
"P",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tstatic long mod = 1000000007;\n\tstatic long INF = Long.MAX_VALUE;\n\n\tstatic long chmin(long a, long b) {\n\t\treturn Math.min(a, b);\n\t}\n\n\tstatic long chmax(long a, long b) {\n\t\treturn Math.max(a, b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// AtCoder_B\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint P[] = new int[N];\n\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(P);\n\n\t\tint ans = 0;\n\t\tfor(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t // Scannerクラスのインスタンスをクローズ\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\n\tstatic long mod = 1000000007;\n\tstatic long INF = Long.MAX_VALUE;\n\n\tstatic long chmin(long a, long b) {\n\t\treturn Math.min(a, b);\n\t}\n\n\tstatic long chmax(long a, long b) {\n\t\treturn Math.max(a, b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\t// AtCoder_B\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint P[] = new int[N];\n\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tP[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(P);\n\n\t\tint ans = 0;\n\t\tfor(int i=0; i<K; i++) {\n\t\t\tans += P[i];\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t // Scannerクラスのインスタンスをクローズ\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
static long mod = 1000000007;
static long INF = Long.MAX_VALUE;
static long chmin(long a, long b) {
return Math.min(a, b);
}
static long chmax(long a, long b) {
return Math.max(a, b);
}
public static void main(String[] args) {
// AtCoder_B
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int P[] = new int[N];
for(int i=0; i<N; i++) {
P[i] = sc.nextInt();
}
Arrays.sort(P);
int ans = 0;
for(int i=0; i<K; i++) {
ans += P[i];
}
System.out.println(ans);
// Scannerクラスのインスタンスをクローズ
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
88,
14
],
[
88,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
17,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
17,
57
],
[
57,
58
],
[
57,
59
],
[
17,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
60,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
17,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
15,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t//入力表示\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tCollections.sort(list);\n\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}\n\t\tSystem.out.println(ans);\n \n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t//入力表示\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tCollections.sort(list);\n\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}\n\t\tSystem.out.println(ans);\n \n }\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t//入力表示\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tCollections.sort(list);\n\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}\n\t\tSystem.out.println(ans);\n \n }",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t//入力表示\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tCollections.sort(list);\n\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}\n\t\tSystem.out.println(ans);\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"for (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tlist.add(sc.nextInt());\n\t\t}",
"{\n\t\t\tlist.add(sc.nextInt());\n\t\t}",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"++i",
"++i",
"i",
"{\n\t\t\tans += list.get(i);\n\t\t}",
"{\n\t\t\tans += list.get(i);\n\t\t}",
"ans += list.get(i)",
"ans",
"list.get(i)",
"list.get",
"list",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t//入力表示\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tCollections.sort(list);\n\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}\n\t\tSystem.out.println(ans);\n \n }\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t//入力表示\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tCollections.sort(list);\n\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; ++i) {\n\t\t\tans += list.get(i);\n\t\t}\n\t\tSystem.out.println(ans);\n \n }\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
//入力表示
int N = sc.nextInt();
int K = sc.nextInt();
List<Integer> list = new ArrayList<>();
for (int i = 0; i < N; i++) {
list.add(sc.nextInt());
}
Collections.sort(list);
int ans = 0;
for (int i = 0; i < K; ++i) {
ans += list.get(i);
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"\nimport java.util.*;\n\npublic class Main {\n\tstatic public void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\t \n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\t\n\t\tList<Integer>list=new ArrayList<>();\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}\n\t\tCollections.sort(list);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}\n\t\tSystem.out.print(sum);\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic public void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\t \n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\t\n\t\tList<Integer>list=new ArrayList<>();\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}\n\t\tCollections.sort(list);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}\n\t\tSystem.out.print(sum);\n\t\t\n\t}\n}",
"Main",
"static public void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\t \n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\t\n\t\tList<Integer>list=new ArrayList<>();\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}\n\t\tCollections.sort(list);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}\n\t\tSystem.out.print(sum);\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\t \n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\t\n\t\tList<Integer>list=new ArrayList<>();\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}\n\t\tCollections.sort(list);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}\n\t\tSystem.out.print(sum);\n\t\t\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer>list=new ArrayList<>();",
"list",
"new ArrayList<>()",
"for(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}",
"{\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}",
"int num=sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list.add(num)",
"list.add",
"list",
"num",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tsum+=list.get(i);\n\t\t}",
"{\n\t\t\tsum+=list.get(i);\n\t\t}",
"sum+=list.get(i)",
"sum",
"list.get(i)",
"list.get",
"list",
"i",
"System.out.print(sum)",
"System.out.print",
"System.out",
"System",
"System.out",
"sum",
"String args[]",
"args",
"public class Main {\n\tstatic public void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\t \n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\t\n\t\tList<Integer>list=new ArrayList<>();\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}\n\t\tCollections.sort(list);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}\n\t\tSystem.out.print(sum);\n\t\t\n\t}\n}",
"public class Main {\n\tstatic public void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\t \n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\t\n\t\tList<Integer>list=new ArrayList<>();\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint num=sc.nextInt();\n\t\t\tlist.add(num);\n\t\t}\n\t\tCollections.sort(list);\n\t\tint sum=0;\n\t\tfor(int i=0;i<k;i++){\n\t\t\tsum+=list.get(i);\n\t\t}\n\t\tSystem.out.print(sum);\n\t\t\n\t}\n}",
"Main"
]
|
import java.util.*;
public class Main {
static public void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt(),k=sc.nextInt();
List<Integer>list=new ArrayList<>();
for(int i=0;i<n;i++){
int num=sc.nextInt();
list.add(num);
}
Collections.sort(list);
int sum=0;
for(int i=0;i<k;i++){
sum+=list.get(i);
}
System.out.print(sum);
}
} |
[
7,
6,
12,
13,
30,
29,
2,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
2,
13,
13,
2,
13,
4,
13,
2,
13,
13,
29,
17,
29,
17,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
40,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
41,
13,
4,
13,
13,
2,
13,
17,
41,
13,
2,
2,
13,
13,
13,
14,
2,
2,
13,
17,
17,
29,
13,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
23,
13,
12,
13,
30,
42,
40,
4,
18,
13,
30,
38,
5,
13,
30,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
12,
13,
30,
4,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
13,
2,
18,
13,
13,
17,
4,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
13,
2,
18,
13,
13,
17,
4,
13,
23,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
2,
3
],
[
2,
4
],
[
4,
5
],
[
5,
6
],
[
6,
7
],
[
7,
8
],
[
7,
9
],
[
6,
10
],
[
10,
11
],
[
10,
12
],
[
2,
13
],
[
13,
14
],
[
2,
15
],
[
15,
16
],
[
0,
17
],
[
17,
18
],
[
17,
19
],
[
0,
20
],
[
20,
21
],
[
20,
22
],
[
0,
23
],
[
458,
24
],
[
458,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
458,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
32,
39
],
[
39,
40
],
[
39,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
30,
45
],
[
45,
46
],
[
458,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
50,
64
],
[
64,
65
],
[
49,
66
],
[
66,
67
],
[
47,
68
],
[
68,
69
],
[
47,
70
],
[
70,
71
],
[
47,
72
],
[
72,
73
],
[
458,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
78,
83
],
[
83,
84
],
[
74,
85
],
[
85,
86
],
[
458,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
91,
96
],
[
87,
97
],
[
97,
98
],
[
87,
99
],
[
99,
100
],
[
458,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
103,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
112,
115
],
[
115,
116
],
[
115,
117
],
[
103,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
103,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
125,
131
],
[
131,
132
],
[
103,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
101,
139
],
[
139,
140
],
[
101,
141
],
[
141,
142
],
[
458,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
149,
151
],
[
149,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
145,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
145,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
161,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
168,
170
],
[
161,
171
],
[
171,
172
],
[
172,
173
],
[
161,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
143,
183
],
[
183,
184
],
[
458,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
192,
197
],
[
197,
198
],
[
197,
199
],
[
192,
200
],
[
200,
201
],
[
201,
202
],
[
192,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
187,
209
],
[
209,
210
],
[
185,
211
],
[
211,
212
],
[
185,
213
],
[
213,
214
],
[
458,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
215,
219
],
[
219,
220
],
[
215,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
223,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
221,
234
],
[
234,
235
],
[
221,
236
],
[
236,
237
],
[
215,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
245,
246
],
[
244,
247
],
[
244,
248
],
[
240,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
249,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
249,
259
],
[
259,
260
],
[
260,
261
],
[
249,
262
],
[
263,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
264,
268
],
[
268,
269
],
[
269,
270
],
[
268,
271
],
[
238,
272
],
[
272,
273
],
[
458,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
274,
278
],
[
278,
279
],
[
274,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
286,
287
],
[
286,
288
],
[
280,
289
],
[
289,
290
],
[
274,
291
],
[
291,
292
],
[
291,
293
],
[
293,
294
],
[
294,
295
],
[
295,
296
],
[
296,
297
],
[
297,
298
],
[
294,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
300,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
293,
308
],
[
308,
309
],
[
309,
310
],
[
310,
311
],
[
274,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
316,
319
],
[
319,
320
],
[
274,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
325,
328
],
[
328,
329
],
[
274,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
337,
342
],
[
342,
343
],
[
342,
344
],
[
337,
345
],
[
345,
346
],
[
346,
347
],
[
337,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
349,
353
],
[
353,
354
],
[
332,
355
],
[
355,
356
],
[
330,
357
],
[
357,
358
],
[
274,
359
],
[
359,
360
],
[
359,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
361,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
366,
371
],
[
371,
372
],
[
371,
373
],
[
366,
374
],
[
374,
375
],
[
375,
376
],
[
366,
377
],
[
377,
378
],
[
378,
379
],
[
379,
380
],
[
379,
381
],
[
378,
382
],
[
382,
383
],
[
361,
384
],
[
384,
385
],
[
359,
386
],
[
386,
387
],
[
458,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
390,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
390,
396
],
[
396,
397
],
[
388,
398
],
[
398,
399
],
[
398,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
401,
406
],
[
406,
407
],
[
406,
408
],
[
408,
409
],
[
408,
410
],
[
401,
411
],
[
411,
412
],
[
412,
413
],
[
401,
414
],
[
415,
415
],
[
415,
416
],
[
416,
417
],
[
416,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
418,
422
],
[
400,
423
],
[
423,
424
],
[
398,
425
],
[
425,
426
],
[
388,
427
],
[
427,
428
],
[
427,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
430,
435
],
[
435,
436
],
[
435,
437
],
[
437,
438
],
[
437,
439
],
[
430,
440
],
[
440,
441
],
[
441,
442
],
[
430,
443
],
[
444,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
448,
449
],
[
448,
450
],
[
447,
451
],
[
429,
452
],
[
452,
453
],
[
427,
454
],
[
454,
455
],
[
388,
456
],
[
0,
457
],
[
457,
458
],
[
457,
459
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt();\n\t\t\tint k=in.nextInt();\n\t\t\tint a[]=in.readArray(n);\n\t\t\tsort(a);\n\t\t\tint ans=0;\n\t\t\tfor(int i=0; i<k; i++) ans=ans+a[i];\n\t\t\tout.println(ans);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t}",
"public int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}",
"compare",
"{\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}",
"return p1.u-p2.u;",
"p1.u-p2.u",
"p1.u",
"p1",
"p1.u",
"p2.u",
"p2",
"p2.u",
"Pair p1",
"p1",
"Pair p2",
"p2",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt();\n\t\t\tint k=in.nextInt();\n\t\t\tint a[]=in.readArray(n);\n\t\t\tsort(a);\n\t\t\tint ans=0;\n\t\t\tfor(int i=0; i<k; i++) ans=ans+a[i];\n\t\t\tout.println(ans);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"Main",
"static long mod=(long)1e9+7;",
"mod",
"(long)1e9+7",
"(long)1e9",
"7",
"public static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt();\n\t\t\tint k=in.nextInt();\n\t\t\tint a[]=in.readArray(n);\n\t\t\tsort(a);\n\t\t\tint ans=0;\n\t\t\tfor(int i=0; i<k; i++) ans=ans+a[i];\n\t\t\tout.println(ans);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}",
"main",
"{\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt();\n\t\t\tint k=in.nextInt();\n\t\t\tint a[]=in.readArray(n);\n\t\t\tsort(a);\n\t\t\tint ans=0;\n\t\t\tfor(int i=0; i<k; i++) ans=ans+a[i];\n\t\t\tout.println(ans);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}",
"Writer out=new Writer(System.out);",
"out",
"new Writer(System.out)",
"Reader in=new Reader(System.in);",
"in",
"new Reader(System.in)",
"int ts=1;",
"ts",
"1",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}",
"tri",
"{\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}",
"if(c<a+b && c>abs(a-b)) return true;",
"c<a+b && c>abs(a-b)",
"c<a+b",
"c",
"a+b",
"a",
"b",
"c>abs(a-b)",
"c",
"abs(a-b)",
"abs",
"a-b",
"a",
"b",
"return true;",
"true",
"return false;",
"false",
"int a",
"a",
"int b",
"b",
"int c",
"c",
"/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}",
"abs",
"{\n\t\treturn a>0 ? a : -a;\n\t}",
"return a>0 ? a : -a;",
"a>0 ? a : -a",
"a>0",
"a",
"0",
"a",
"-a",
"a",
"int a",
"a",
"static int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}",
"max",
"{\n\t\treturn a>b ? a : b;\n\t}",
"return a>b ? a : b;",
"a>b ? a : b",
"a>b",
"a",
"b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}",
"pow",
"{\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}",
"if(m==0) return 1;",
"m==0",
"m",
"0",
"return 1;",
"1",
"int temp=pow(n,m/2);",
"temp",
"pow(n,m/2)",
"pow",
"n",
"m/2",
"m",
"2",
"long res=(((long)temp*temp)%mod);",
"res",
"(((long)temp*temp)%mod)",
"((long)temp*temp)",
"(long)temp",
"temp",
"mod",
"if(m%2==0) return (int)res;",
"m%2==0",
"m%2",
"m",
"2",
"0",
"return (int)res;",
"(int)res",
"return (int)((res*n)%mod);",
"(int)((res*n)%mod)",
"(res*n)",
"res",
"n",
"mod",
"int n",
"n",
"int m",
"m",
"static void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}",
"sort",
"{\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}",
"ArrayList<Integer> list=new ArrayList<>();",
"list",
"new ArrayList<>()",
"for (int i:a) list.add(i);",
"int i",
"a",
"list.add(i);",
"list.add(i)",
"list.add",
"list",
"i",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for (int i=0; i<a.length; i++) a[i]=list.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=list.get(i);",
"a[i]=list.get(i)",
"a[i]",
"a",
"i",
"list.get(i)",
"list.get",
"list",
"i",
"int[] a",
"a",
"static int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}",
"array",
"{\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n; i++) a[i]=value;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=value;",
"a[i]=value",
"a[i]",
"a",
"i",
"value",
"return a;",
"a",
"int n",
"n",
"int value",
"value",
"static class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"Pair",
"int u",
"u",
"v;",
"v",
"Pair(int u, int v){this.u=u; this.v=v;}",
"Pair",
"{this.u=u; this.v=v;}",
"this.u=u",
"this.u",
"this",
"this.u",
"u",
"this.v=v",
"this.v",
"this",
"this.v",
"v",
"int u",
"u",
"int v",
"v",
"static void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}",
"sort",
"{\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}",
"List<Pair> al=new ArrayList<>(Arrays.asList(coll));",
"al",
"new ArrayList<>(Arrays.asList(coll))",
"Collections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t})",
"Collections.sort",
"Collections",
"al",
"new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t}",
"for(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<al.size()",
"i",
"al.size()",
"al.size",
"al",
"i++",
"i++",
"i",
"{\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}",
"{\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}",
"coll[i]=al.get(i)",
"coll[i]",
"coll",
"i",
"al.get(i)",
"al.get",
"al",
"i",
"Pair [] coll",
"coll",
"static class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}",
"Reader",
"BufferedReader br;",
"br",
"StringTokenizer to;",
"to",
"Reader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}",
"Reader",
"{\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}",
"br=new BufferedReader(new InputStreamReader(stream))",
"br",
"new BufferedReader(new InputStreamReader(stream))",
"to=new StringTokenizer(\"\")",
"to",
"new StringTokenizer(\"\")",
"InputStream stream",
"stream",
"String next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}",
"next",
"{\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}",
"while(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}",
"!to.hasMoreTokens()",
"to.hasMoreTokens()",
"to.hasMoreTokens",
"to",
"{\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}",
"try {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}",
"catch(IOException e) {}",
"IOException e",
"{}",
"{\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}",
"to=new StringTokenizer(br.readLine())",
"to",
"new StringTokenizer(br.readLine())",
"return to.nextToken();",
"to.nextToken()",
"to.nextToken",
"to",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"int [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n ;i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}",
"readLongArray",
"{\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}",
"long a[]=new long[n];",
"a",
"new long[n]",
"n",
"for(int i=0; i<n ;i++) a[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextLong();",
"a[i]=nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"static class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}",
"Writer",
"Writer(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}",
"Writer",
"{\n\t\t\tsuper(stream);\n\t\t}",
"super(stream)",
"super",
"stream",
"OutputStream stream",
"stream",
"void println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"println",
"{\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"for(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"print(array[i]+\" \")",
"print",
"array[i]+\" \"",
"array[i]",
"array",
"i",
"\" \"",
"println()",
"println",
"int [] array",
"array",
"void println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"println",
"{\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"for(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"print(array[i]+\" \")",
"print",
"array[i]+\" \"",
"array[i]",
"array",
"i",
"\" \"",
"println()",
"println",
"long [] array",
"array",
"PrintWriter",
"public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt();\n\t\t\tint k=in.nextInt();\n\t\t\tint a[]=in.readArray(n);\n\t\t\tsort(a);\n\t\t\tint ans=0;\n\t\t\tfor(int i=0; i<k; i++) ans=ans+a[i];\n\t\t\tout.println(ans);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt();\n\t\t\tint k=in.nextInt();\n\t\t\tint a[]=in.readArray(n);\n\t\t\tsort(a);\n\t\t\tint ans=0;\n\t\t\tfor(int i=0; i<k; i++) ans=ans+a[i];\n\t\t\tout.println(ans);\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main{
static long mod=(long)1e9+7;
public static void main(String[] args) throws IOException {
Writer out=new Writer(System.out);
Reader in=new Reader(System.in);
int ts=1;
outer: while(ts-->0) {
int n=in.nextInt();
int k=in.nextInt();
int a[]=in.readArray(n);
sort(a);
int ans=0;
for(int i=0; i<k; i++) ans=ans+a[i];
out.println(ans);
}
out.close();
}
static boolean tri(int a, int b, int c) {
if(c<a+b && c>abs(a-b)) return true;
return false;
}
/*********************************** UTILITY CODE BELOW **************************************/
static int abs(int a) {
return a>0 ? a : -a;
}
static int max(int a, int b) {
return a>b ? a : b;
}
static int pow(int n, int m) {
if(m==0) return 1;
int temp=pow(n,m/2);
long res=(((long)temp*temp)%mod);
if(m%2==0) return (int)res;
return (int)((res*n)%mod);
}
static class Pair{
int u, v;
Pair(int u, int v){this.u=u; this.v=v;}
static void sort(Pair [] coll) {
List<Pair> al=new ArrayList<>(Arrays.asList(coll));
Collections.sort(al,new Comparator<Pair>() {
public int compare(Pair p1, Pair p2) {
return p1.u-p2.u;
}
});
for(int i=0; i<al.size(); i++) {
coll[i]=al.get(i);
}
}
}
static void sort(int[] a) {
ArrayList<Integer> list=new ArrayList<>();
for (int i:a) list.add(i);
Collections.sort(list);
for (int i=0; i<a.length; i++) a[i]=list.get(i);
}
static int [] array(int n, int value) {
int a[]=new int[n];
for(int i=0; i<n; i++) a[i]=value;
return a;
}
static class Reader{
BufferedReader br;
StringTokenizer to;
Reader(InputStream stream){
br=new BufferedReader(new InputStreamReader(stream));
to=new StringTokenizer("");
}
String next() {
while(!to.hasMoreTokens()) {
try {
to=new StringTokenizer(br.readLine());
}catch(IOException e) {}
}
return to.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
int [] readArray(int n) {
int a[]=new int[n];
for(int i=0; i<n ;i++) a[i]=nextInt();
return a;
}
long [] readLongArray(int n) {
long a[]=new long[n];
for(int i=0; i<n ;i++) a[i]=nextLong();
return a;
}
}
static class Writer extends PrintWriter{
Writer(OutputStream stream){
super(stream);
}
void println(int [] array) {
for(int i=0; i<array.length; i++) {
print(array[i]+" ");
}
println();
}
void println(long [] array) {
for(int i=0; i<array.length; i++) {
print(array[i]+" ");
}
println();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
14,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
14,
54
],
[
54,
55
],
[
54,
56
],
[
14,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
14,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
12,
82
],
[
82,
83
]
]
| [
"import java.util.ArrayList;\nimport java.util.*;\n//import java.lang.*;\nimport java.util.regex.*;\n class Main{\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n List<Integer> l=new ArrayList<>();\n int N=sc.nextInt();\n int K=sc.nextInt();\n for(int i=0;i<N;i++){\n l.add(sc.nextInt());\n }\n Collections.sort(l);\n int sum=0;\n for(int i=0;i<K;i++){\n sum+=l.get(i);\n }\n System.out.println(sum);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.*;",
"util.*",
"java",
"import java.util.regex.*;",
"regex.*",
"java.util",
"class Main{\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n List<Integer> l=new ArrayList<>();\n int N=sc.nextInt();\n int K=sc.nextInt();\n for(int i=0;i<N;i++){\n l.add(sc.nextInt());\n }\n Collections.sort(l);\n int sum=0;\n for(int i=0;i<K;i++){\n sum+=l.get(i);\n }\n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n List<Integer> l=new ArrayList<>();\n int N=sc.nextInt();\n int K=sc.nextInt();\n for(int i=0;i<N;i++){\n l.add(sc.nextInt());\n }\n Collections.sort(l);\n int sum=0;\n for(int i=0;i<K;i++){\n sum+=l.get(i);\n }\n System.out.println(sum);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n List<Integer> l=new ArrayList<>();\n int N=sc.nextInt();\n int K=sc.nextInt();\n for(int i=0;i<N;i++){\n l.add(sc.nextInt());\n }\n Collections.sort(l);\n int sum=0;\n for(int i=0;i<K;i++){\n sum+=l.get(i);\n }\n System.out.println(sum);\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"List<Integer> l=new ArrayList<>();",
"l",
"new ArrayList<>()",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K=sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<N;i++){\n l.add(sc.nextInt());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n l.add(sc.nextInt());\n }",
"{\n l.add(sc.nextInt());\n }",
"l.add(sc.nextInt())",
"l.add",
"l",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(l)",
"Collections.sort",
"Collections",
"l",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<K;i++){\n sum+=l.get(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n sum+=l.get(i);\n }",
"{\n sum+=l.get(i);\n }",
"sum+=l.get(i)",
"sum",
"l.get(i)",
"l.get",
"l",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args"
]
| import java.util.ArrayList;
import java.util.*;
//import java.lang.*;
import java.util.regex.*;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
List<Integer> l=new ArrayList<>();
int N=sc.nextInt();
int K=sc.nextInt();
for(int i=0;i<N;i++){
l.add(sc.nextInt());
}
Collections.sort(l);
int sum=0;
for(int i=0;i<K;i++){
sum+=l.get(i);
}
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
149,
23
],
[
149,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
26,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
26,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
26,
50
],
[
50,
51
],
[
50,
52
],
[
26,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
26,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
24,
77
],
[
77,
78
],
[
149,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
90,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
95,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
89,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
79,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
79,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
131,
132
],
[
131,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
126,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
121,
144
],
[
144,
145
],
[
119,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.StringTokenizer;\nimport java.util.Arrays;\nimport java.lang.Math;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n\n int N = fs.nextInt(); int K = fs.nextInt();\n\n int[] ar = fs.readArray(N);\n Arrays.sort(ar);\n\n int sum = 0;\n for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }\n System.out.println(sum);\n\n\n\n\n\n\n\n }\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n }\n\n}\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n\n int N = fs.nextInt(); int K = fs.nextInt();\n\n int[] ar = fs.readArray(N);\n Arrays.sort(ar);\n\n int sum = 0;\n for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }\n System.out.println(sum);\n\n\n\n\n\n\n\n }\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n\n int N = fs.nextInt(); int K = fs.nextInt();\n\n int[] ar = fs.readArray(N);\n Arrays.sort(ar);\n\n int sum = 0;\n for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }\n System.out.println(sum);\n\n\n\n\n\n\n\n }",
"main",
"{\n FastScanner fs = new FastScanner();\n\n int N = fs.nextInt(); int K = fs.nextInt();\n\n int[] ar = fs.readArray(N);\n Arrays.sort(ar);\n\n int sum = 0;\n for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }\n System.out.println(sum);\n\n\n\n\n\n\n\n }",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"int N = fs.nextInt();",
"N",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int K = fs.nextInt();",
"K",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int[] ar = fs.readArray(N);",
"ar",
"fs.readArray(N)",
"fs.readArray",
"fs",
"N",
"Arrays.sort(ar)",
"Arrays.sort",
"Arrays",
"ar",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n sum +=ar[i];\n }",
"{\n sum +=ar[i];\n }",
"sum +=ar[i]",
"sum",
"ar[i]",
"ar",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n }",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"public String next() {\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"next",
"{\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st=new StringTokenizer(br.readLine());\n }",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"readArray",
"{\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n\n int N = fs.nextInt(); int K = fs.nextInt();\n\n int[] ar = fs.readArray(N);\n Arrays.sort(ar);\n\n int sum = 0;\n for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }\n System.out.println(sum);\n\n\n\n\n\n\n\n }\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n\n int N = fs.nextInt(); int K = fs.nextInt();\n\n int[] ar = fs.readArray(N);\n Arrays.sort(ar);\n\n int sum = 0;\n for (int i = 0; i<K; i++) {\n sum +=ar[i];\n }\n System.out.println(sum);\n\n\n\n\n\n\n\n }\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreElements())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n }\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.lang.Math;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int N = fs.nextInt(); int K = fs.nextInt();
int[] ar = fs.readArray(N);
Arrays.sort(ar);
int sum = 0;
for (int i = 0; i<K; i++) {
sum +=ar[i];
}
System.out.println(sum);
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
public String next() {
while (!st.hasMoreElements())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
17,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
12,
13,
30,
4,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
14,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
456,
17
],
[
456,
18
],
[
18,
19
],
[
18,
20
],
[
456,
21
],
[
21,
22
],
[
21,
23
],
[
456,
24
],
[
24,
25
],
[
456,
26
],
[
26,
27
],
[
456,
28
],
[
28,
29
],
[
456,
30
],
[
30,
31
],
[
456,
32
],
[
32,
33
],
[
456,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
36,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
36,
58
],
[
58,
59
],
[
58,
60
],
[
36,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
36,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
36,
82
],
[
82,
83
],
[
83,
84
],
[
34,
85
],
[
85,
86
],
[
456,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
87,
94
],
[
94,
95
],
[
94,
96
],
[
87,
98
],
[
98,
99
],
[
98,
100
],
[
87,
101
],
[
101,
102
],
[
101,
103
],
[
87,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
107,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
118,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
114,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
106,
139
],
[
139,
140
],
[
87,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
144,
152
],
[
152,
153
],
[
153,
154
],
[
87,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
163,
165
],
[
155,
166
],
[
166,
167
],
[
87,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
178,
180
],
[
171,
181
],
[
181,
182
],
[
87,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
189,
190
],
[
87,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
194,
198
],
[
198,
199
],
[
193,
200
],
[
200,
201
],
[
200,
202
],
[
193,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
193,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
211,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
193,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
87,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
228,
231
],
[
231,
232
],
[
87,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
236,
240
],
[
240,
241
],
[
235,
242
],
[
242,
243
],
[
242,
244
],
[
235,
245
],
[
245,
246
],
[
245,
247
],
[
235,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
235,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
235,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
265,
269
],
[
269,
270
],
[
269,
271
],
[
264,
272
],
[
272,
273
],
[
273,
274
],
[
235,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
283,
284
],
[
283,
285
],
[
278,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
292,
294
],
[
278,
295
],
[
295,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
296,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
295,
305
],
[
305,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
307,
311
],
[
295,
312
],
[
312,
313
],
[
313,
314
],
[
277,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
87,
319
],
[
319,
320
],
[
319,
321
],
[
321,
322
],
[
322,
323
],
[
323,
324
],
[
87,
325
],
[
325,
326
],
[
325,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
330,
331
],
[
331,
332
],
[
331,
333
],
[
334,
335
],
[
334,
336
],
[
330,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
337,
342
],
[
342,
343
],
[
342,
344
],
[
337,
345
],
[
345,
346
],
[
346,
347
],
[
337,
348
],
[
349,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
354
],
[
354,
355
],
[
355,
356
],
[
330,
357
],
[
357,
358
],
[
328,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
359,
364
],
[
364,
365
],
[
365,
366
],
[
366,
367
],
[
366,
368
],
[
364,
369
],
[
369,
370
],
[
369,
371
],
[
364,
372
],
[
372,
373
],
[
373,
374
],
[
364,
375
],
[
376,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
378,
380
],
[
377,
381
],
[
381,
382
],
[
382,
383
],
[
359,
384
],
[
384,
385
],
[
325,
386
],
[
386,
387
],
[
325,
388
],
[
388,
389
],
[
87,
390
],
[
390,
391
],
[
390,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
396,
397
],
[
396,
398
],
[
399,
400
],
[
399,
401
],
[
395,
402
],
[
402,
403
],
[
403,
404
],
[
404,
405
],
[
404,
406
],
[
402,
407
],
[
407,
408
],
[
407,
409
],
[
402,
410
],
[
410,
411
],
[
411,
412
],
[
402,
413
],
[
414,
414
],
[
414,
415
],
[
415,
416
],
[
416,
417
],
[
416,
418
],
[
415,
419
],
[
419,
420
],
[
420,
421
],
[
395,
422
],
[
422,
423
],
[
393,
424
],
[
424,
425
],
[
425,
426
],
[
425,
427
],
[
424,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
429,
434
],
[
434,
435
],
[
434,
436
],
[
429,
437
],
[
437,
438
],
[
438,
439
],
[
429,
440
],
[
441,
441
],
[
441,
442
],
[
442,
443
],
[
443,
444
],
[
443,
445
],
[
442,
446
],
[
446,
447
],
[
447,
448
],
[
424,
449
],
[
449,
450
],
[
390,
451
],
[
451,
452
],
[
390,
453
],
[
453,
454
],
[
0,
455
],
[
455,
456
],
[
455,
457
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.NoSuchElementException;\n\npublic class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\tstatic int m;\n\tstatic int a;\n\tstatic int b;\n\tstatic String s;\n\t//static HashMap <Integer, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint p[] = sc.nextIntArray(n, false);\n\t\t\n\t\tArrays.sort(p);\n\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i=0; i<k; i++)\n\t\t\tans+=p[i];\n\t\t\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"public class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\tstatic int m;\n\tstatic int a;\n\tstatic int b;\n\tstatic String s;\n\t//static HashMap <Integer, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint p[] = sc.nextIntArray(n, false);\n\t\t\n\t\tArrays.sort(p);\n\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i=0; i<k; i++)\n\t\t\tans+=p[i];\n\t\t\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t }\n}",
"Main",
"static FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static int n;",
"n",
"static int m;",
"m",
"static int a;",
"a",
"static int b;",
"b",
"static String s;",
"s",
"public static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint p[] = sc.nextIntArray(n, false);\n\t\t\n\t\tArrays.sort(p);\n\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i=0; i<k; i++)\n\t\t\tans+=p[i];\n\t\t\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t\t\n\t}",
"main",
"{\n\t\tn = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint p[] = sc.nextIntArray(n, false);\n\t\t\n\t\tArrays.sort(p);\n\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i=0; i<k; i++)\n\t\t\tans+=p[i];\n\t\t\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t\t\n\t}",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int p[] = sc.nextIntArray(n, false);",
"p",
"sc.nextIntArray(n, false)",
"sc.nextIntArray",
"sc",
"n",
"false",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int ans = 0;",
"ans",
"0",
"for (int i=0; i<k; i++)\n\t\t\tans+=p[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"ans+=p[i];",
"ans+=p[i]",
"ans",
"p[i]",
"p",
"i",
"out.println(ans)",
"out.println",
"out",
"ans",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"static class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t }",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }",
"hasNextByte",
"{\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }",
"if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t return true;\n\t }",
"return true;",
"true",
"{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }",
"ptr = 0",
"ptr",
"0",
"try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"IOException e",
"{\n\t e.printStackTrace();\n\t }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t buflen = in.read(buffer);\n\t }",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t return false;\n\t }",
"buflen <= 0",
"buflen",
"0",
"{\n\t return false;\n\t }",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }",
"readByte",
"{\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }",
"if (hasNextByte()) return buffer[ptr++];\n\t else return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }",
"isPrintableChar",
"{\n\t return 33 <= c && c <= 126;\n\t }",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }",
"skipUnprintable",
"{\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }",
"while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }",
"hasNext",
"{\n\t skipUnprintable();\n\t return hasNextByte();\n\t }",
"skipUnprintable()",
"skipUnprintable",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }",
"next",
"{\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }",
"nextDouble",
"{\n\t \treturn Double.parseDouble(next());\n\t }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }",
"nextLong",
"{\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }",
"b == '-'",
"b",
"'-'",
"{\n\t minus = true;\n\t b = readByte();\n\t }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n\t throw new NumberFormatException();\n\t }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }",
"true",
"{\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }",
"if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n\t n *= 10;\n\t n += b - '0';\n\t }",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t return minus ? -n : n;\n\t }",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n\t throw new NumberFormatException();\n\t }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n\t return (int) nextLong();\n\t }",
"nextInt",
"{\n\t return (int) nextLong();\n\t }",
"return (int) nextLong();",
"(int) nextLong()",
"nextLong",
"public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }",
"nextIntArray",
"{\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }",
"if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }",
"oneBased",
"{\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }",
"int[] array = new int[N + 1];",
"array",
"new int[N + 1]",
"N + 1",
"N",
"1",
"for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextInt();\n\t }",
"{\n\t array[i] = sc.nextInt();\n\t }",
"array[i] = sc.nextInt()",
"array[i]",
"array",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"return array;",
"array",
"{\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }",
"int[] array = new int[N];",
"array",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextInt();\n\t }",
"{\n\t array[i] = sc.nextInt();\n\t }",
"array[i] = sc.nextInt()",
"array[i]",
"array",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"return array;",
"array",
"int N",
"N",
"boolean oneBased",
"oneBased",
"public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }",
"nextLongArray",
"{\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }",
"if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }",
"oneBased",
"{\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }",
"long[] array = new long[N + 1];",
"array",
"new long[N + 1]",
"N + 1",
"N",
"1",
"for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextLong();\n\t }",
"{\n\t array[i] = sc.nextLong();\n\t }",
"array[i] = sc.nextLong()",
"array[i]",
"array",
"i",
"sc.nextLong()",
"sc.nextLong",
"sc",
"return array;",
"array",
"{\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }",
"long[] array = new long[N];",
"array",
"new long[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextLong();\n\t }",
"{\n\t array[i] = sc.nextLong();\n\t }",
"array[i] = sc.nextLong()",
"array[i]",
"array",
"i",
"sc.nextLong()",
"sc.nextLong",
"sc",
"return array;",
"array",
"int N",
"N",
"boolean oneBased",
"oneBased",
"public class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\tstatic int m;\n\tstatic int a;\n\tstatic int b;\n\tstatic String s;\n\t//static HashMap <Integer, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint p[] = sc.nextIntArray(n, false);\n\t\t\n\t\tArrays.sort(p);\n\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i=0; i<k; i++)\n\t\t\tans+=p[i];\n\t\t\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t }\n}",
"public class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\tstatic int m;\n\tstatic int a;\n\tstatic int b;\n\tstatic String s;\n\t//static HashMap <Integer, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tint p[] = sc.nextIntArray(n, false);\n\t\t\n\t\tArrays.sort(p);\n\n\t\tint ans = 0;\n\t\t\n\t\tfor (int i=0; i<k; i++)\n\t\t\tans+=p[i];\n\t\t\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t }\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.NoSuchElementException;
public class Main{
static FastScanner sc = new FastScanner();
static PrintWriter out = new PrintWriter(System.out);
static int n;
static int m;
static int a;
static int b;
static String s;
//static HashMap <Integer, Integer> map;
public static void main(String[] args) {
n = sc.nextInt();
int k = sc.nextInt();
int p[] = sc.nextIntArray(n, false);
Arrays.sort(p);
int ans = 0;
for (int i=0; i<k; i++)
ans+=p[i];
out.println(ans);
out.flush();
}
static class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() {
if (hasNextByte()) return buffer[ptr++];
else return -1;
}
private static boolean isPrintableChar(int c) {
return 33 <= c && c <= 126;
}
private void skipUnprintable() {
while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
}
public boolean hasNext() {
skipUnprintable();
return hasNextByte();
}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public double nextDouble () {
return Double.parseDouble(next());
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while (true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if (b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
return (int) nextLong();
}
public int[] nextIntArray(int N, boolean oneBased) {
if (oneBased) {
int[] array = new int[N + 1];
for (int i = 1; i <= N; i++) {
array[i] = sc.nextInt();
}
return array;
} else {
int[] array = new int[N];
for (int i = 0; i < N; i++) {
array[i] = sc.nextInt();
}
return array;
}
}
public long[] nextLongArray(int N, boolean oneBased) {
if (oneBased) {
long[] array = new long[N + 1];
for (int i = 1; i <= N; i++) {
array[i] = sc.nextLong();
}
return array;
} else {
long[] array = new long[N];
for (int i = 0; i < N; i++) {
array[i] = sc.nextLong();
}
return array;
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
7,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
14,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
14,
56
],
[
56,
57
],
[
56,
58
],
[
14,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
14,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
12,
83
],
[
83,
84
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\nclass Main {\n \n private static final int N = 50000;\n \n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n System.out.println(sum);\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n \n private static final int N = 50000;\n \n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n System.out.println(sum);\n }\n}",
"Main",
"private static final int N = 50000;",
"N",
"50000",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n System.out.println(sum);\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int sum = 0;\n for (int i = 0; i < k; i++) {\n sum += arr[i];\n }\n System.out.println(sum);\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int k = s.nextInt();",
"k",
"s.nextInt()",
"s.nextInt",
"s",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n arr[i] = s.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = s.nextInt();\n }",
"{\n arr[i] = s.nextInt();\n }",
"arr[i] = s.nextInt()",
"arr[i]",
"arr",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < k; i++) {\n sum += arr[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n sum += arr[i];\n }",
"{\n sum += arr[i];\n }",
"sum += arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args"
]
| import java.util.Arrays;
import java.util.Scanner;
class Main {
private static final int N = 50000;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int k = s.nextInt();
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = s.nextInt();
}
Arrays.sort(arr);
int sum = 0;
for (int i = 0; i < k; i++) {
sum += arr[i];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
65,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.PriorityQueue;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n PriorityQueue<Integer> queue= new PriorityQueue<Integer>();\n int count=0;\n\n for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }\n\n\n for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }\n System.out.println(count);\n\t}\n\n}",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n PriorityQueue<Integer> queue= new PriorityQueue<Integer>();\n int count=0;\n\n for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }\n\n\n for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }\n System.out.println(count);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n PriorityQueue<Integer> queue= new PriorityQueue<Integer>();\n int count=0;\n\n for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }\n\n\n for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }\n System.out.println(count);\n\t}",
"main",
"{\n\t Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n PriorityQueue<Integer> queue= new PriorityQueue<Integer>();\n int count=0;\n\n for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }\n\n\n for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }\n System.out.println(count);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"PriorityQueue<Integer> queue= new PriorityQueue<Integer>();",
"queue",
"new PriorityQueue<Integer>()",
"int count=0;",
"count",
"0",
"for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int num = sc.nextInt();\n queue.add(num);\n }",
"{\n int num = sc.nextInt();\n queue.add(num);\n }",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"queue.add(num)",
"queue.add",
"queue",
"num",
"for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int num = queue.poll();\n count+=num;\n }",
"{\n int num = queue.poll();\n count+=num;\n }",
"int num = queue.poll();",
"num",
"queue.poll()",
"queue.poll",
"queue",
"count+=num",
"count",
"num",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n PriorityQueue<Integer> queue= new PriorityQueue<Integer>();\n int count=0;\n\n for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }\n\n\n for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }\n System.out.println(count);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n PriorityQueue<Integer> queue= new PriorityQueue<Integer>();\n int count=0;\n\n for(int i=0; i<N; i++) {\n int num = sc.nextInt();\n queue.add(num);\n }\n\n\n for(int i=0;i<K;i++) {\n int num = queue.poll();\n count+=num;\n }\n System.out.println(count);\n\t}\n\n}",
"Main"
]
| import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
PriorityQueue<Integer> queue= new PriorityQueue<Integer>();
int count=0;
for(int i=0; i<N; i++) {
int num = sc.nextInt();
queue.add(num);
}
for(int i=0;i<K;i++) {
int num = queue.poll();
count+=num;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
0,
13,
17,
41,
13,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
101,
8
],
[
101,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
11,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
11,
37
],
[
37,
38
],
[
37,
39
],
[
11,
41
],
[
41,
42
],
[
41,
43
],
[
11,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
11,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
11,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
11,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
11,
95
],
[
95,
96
],
[
96,
97
],
[
9,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint wa,tuginoSaidai,hozon;\n\t\twa = 0;\n\t\tfinal int KOSU = N;\n\t\tint[] kakaku = new int[KOSU];\n\t\tint[] narabi = new int[KOSU]; \n\t\tfor (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(kakaku);\n\t\tfor(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}\n\t\tSystem.out.println(wa);\n\t\tsc.close();\n\t}\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint wa,tuginoSaidai,hozon;\n\t\twa = 0;\n\t\tfinal int KOSU = N;\n\t\tint[] kakaku = new int[KOSU];\n\t\tint[] narabi = new int[KOSU]; \n\t\tfor (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(kakaku);\n\t\tfor(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}\n\t\tSystem.out.println(wa);\n\t\tsc.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint wa,tuginoSaidai,hozon;\n\t\twa = 0;\n\t\tfinal int KOSU = N;\n\t\tint[] kakaku = new int[KOSU];\n\t\tint[] narabi = new int[KOSU]; \n\t\tfor (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(kakaku);\n\t\tfor(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}\n\t\tSystem.out.println(wa);\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint wa,tuginoSaidai,hozon;\n\t\twa = 0;\n\t\tfinal int KOSU = N;\n\t\tint[] kakaku = new int[KOSU];\n\t\tint[] narabi = new int[KOSU]; \n\t\tfor (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(kakaku);\n\t\tfor(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}\n\t\tSystem.out.println(wa);\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int wa",
"wa",
"tuginoSaidai",
"tuginoSaidai",
"hozon;",
"hozon",
"wa = 0",
"wa",
"0",
"final int KOSU = N;",
"KOSU",
"N",
"int[] kakaku = new int[KOSU];",
"kakaku",
"new int[KOSU]",
"KOSU",
"int[] narabi = new int[KOSU];",
"narabi",
"new int[KOSU]",
"KOSU",
"for (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<KOSU",
"i",
"KOSU",
"i++",
"i++",
"i",
"{\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}",
"kakaku[i] = sc.nextInt()",
"kakaku[i]",
"kakaku",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(kakaku)",
"Arrays.sort",
"Arrays",
"kakaku",
"for(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\twa = wa +kakaku[i];\n\t\t}",
"{\n\t\t\twa = wa +kakaku[i];\n\t\t}",
"wa = wa +kakaku[i]",
"wa",
"wa +kakaku[i]",
"wa",
"kakaku[i]",
"kakaku",
"i",
"System.out.println(wa)",
"System.out.println",
"System.out",
"System",
"System.out",
"wa",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint wa,tuginoSaidai,hozon;\n\t\twa = 0;\n\t\tfinal int KOSU = N;\n\t\tint[] kakaku = new int[KOSU];\n\t\tint[] narabi = new int[KOSU]; \n\t\tfor (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(kakaku);\n\t\tfor(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}\n\t\tSystem.out.println(wa);\n\t\tsc.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint wa,tuginoSaidai,hozon;\n\t\twa = 0;\n\t\tfinal int KOSU = N;\n\t\tint[] kakaku = new int[KOSU];\n\t\tint[] narabi = new int[KOSU]; \n\t\tfor (int i=0;i<KOSU;i++) {\n\t\t\tkakaku[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(kakaku);\n\t\tfor(int i=0;i<K;i++) {\n\t\t\twa = wa +kakaku[i];\n\t\t}\n\t\tSystem.out.println(wa);\n\t\tsc.close();\n\t}\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int wa,tuginoSaidai,hozon;
wa = 0;
final int KOSU = N;
int[] kakaku = new int[KOSU];
int[] narabi = new int[KOSU];
for (int i=0;i<KOSU;i++) {
kakaku[i] = sc.nextInt();
}
Arrays.sort(kakaku);
for(int i=0;i<K;i++) {
wa = wa +kakaku[i];
}
System.out.println(wa);
sc.close();
}
} |
[
7,
6,
12,
13,
30,
14,
2,
18,
13,
17,
18,
13,
17,
29,
40,
17,
29,
17,
23,
13,
23,
13,
6,
12,
13,
30,
29,
2,
18,
13,
17,
18,
13,
17,
23,
13,
23,
13,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
0,
13,
4,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
2,
4,
18,
13,
2,
18,
13,
17,
18,
13,
17,
4,
18,
13,
2,
18,
13,
17,
18,
13,
17,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
4,
13,
13,
13,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
41,
13,
17,
0,
13,
13,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
17,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
20,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
20,
29,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
2,
3
],
[
2,
4
],
[
4,
5
],
[
5,
6
],
[
6,
7
],
[
7,
8
],
[
7,
9
],
[
6,
10
],
[
10,
11
],
[
10,
12
],
[
5,
13
],
[
13,
14
],
[
14,
15
],
[
5,
16
],
[
16,
17
],
[
2,
18
],
[
18,
19
],
[
2,
20
],
[
20,
21
],
[
0,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
23,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
0,
38
],
[
38,
39
],
[
38,
40
],
[
0,
41
],
[
41,
42
],
[
41,
43
],
[
0,
44
],
[
44,
45
],
[
44,
46
],
[
0,
47
],
[
47,
48
],
[
47,
49
],
[
0,
50
],
[
549,
51
],
[
549,
52
],
[
52,
53
],
[
52,
54
],
[
549,
55
],
[
55,
56
],
[
55,
57
],
[
549,
58
],
[
58,
59
],
[
58,
60
],
[
549,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
63,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
63,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
63,
80
],
[
80,
81
],
[
80,
82
],
[
63,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
63,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
63,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
63,
112
],
[
112,
113
],
[
112,
114
],
[
63,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
115,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
63,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
63,
136
],
[
136,
137
],
[
137,
138
],
[
61,
139
],
[
139,
140
],
[
549,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
153,
155
],
[
145,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
163,
165
],
[
141,
166
],
[
166,
167
],
[
141,
168
],
[
168,
169
],
[
549,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
178,
181
],
[
172,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
182,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
189,
192
],
[
192,
193
],
[
192,
194
],
[
170,
195
],
[
195,
196
],
[
170,
197
],
[
197,
198
],
[
549,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
202,
206
],
[
206,
207
],
[
201,
208
],
[
208,
209
],
[
208,
210
],
[
201,
211
],
[
211,
212
],
[
211,
213
],
[
201,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
214,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
219,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
218,
232
],
[
232,
233
],
[
232,
234
],
[
218,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
201,
242
],
[
242,
243
],
[
199,
244
],
[
244,
245
],
[
199,
246
],
[
246,
247
],
[
199,
248
],
[
248,
249
],
[
549,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
256,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
263,
265
],
[
256,
266
],
[
266,
267
],
[
267,
268
],
[
256,
269
],
[
270,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
274,
275
],
[
273,
276
],
[
276,
277
],
[
276,
278
],
[
270,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
281,
283
],
[
270,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
288
],
[
288,
289
],
[
288,
290
],
[
270,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
291,
295
],
[
252,
296
],
[
296,
297
],
[
250,
298
],
[
298,
299
],
[
549,
300
],
[
300,
301
],
[
300,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
306,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
313,
315
],
[
306,
316
],
[
316,
317
],
[
317,
318
],
[
306,
319
],
[
320,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
324,
325
],
[
323,
326
],
[
326,
327
],
[
326,
328
],
[
320,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
331,
333
],
[
320,
334
],
[
334,
335
],
[
335,
336
],
[
335,
337
],
[
334,
338
],
[
338,
339
],
[
338,
340
],
[
320,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
341,
345
],
[
302,
346
],
[
346,
347
],
[
300,
348
],
[
348,
349
],
[
549,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
353,
354
],
[
353,
355
],
[
352,
356
],
[
356,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
356,
361
],
[
361,
362
],
[
361,
363
],
[
363,
364
],
[
363,
365
],
[
356,
366
],
[
366,
367
],
[
367,
368
],
[
356,
369
],
[
370,
370
],
[
370,
371
],
[
371,
372
],
[
371,
373
],
[
373,
374
],
[
374,
375
],
[
373,
376
],
[
376,
377
],
[
376,
378
],
[
370,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
381,
383
],
[
370,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
384,
388
],
[
388,
389
],
[
388,
390
],
[
370,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
352,
396
],
[
396,
397
],
[
397,
398
],
[
396,
399
],
[
396,
400
],
[
352,
401
],
[
401,
402
],
[
350,
403
],
[
403,
404
],
[
549,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
408,
410
],
[
407,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
413,
415
],
[
411,
416
],
[
416,
417
],
[
416,
418
],
[
418,
419
],
[
418,
420
],
[
411,
421
],
[
421,
422
],
[
422,
423
],
[
411,
424
],
[
425,
425
],
[
425,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
428,
431
],
[
431,
432
],
[
431,
433
],
[
425,
434
],
[
434,
435
],
[
434,
436
],
[
436,
437
],
[
436,
438
],
[
425,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
439,
443
],
[
443,
444
],
[
443,
445
],
[
425,
446
],
[
446,
447
],
[
447,
448
],
[
447,
449
],
[
446,
450
],
[
407,
451
],
[
451,
452
],
[
452,
453
],
[
451,
454
],
[
451,
455
],
[
407,
456
],
[
456,
457
],
[
405,
458
],
[
458,
459
],
[
549,
460
],
[
460,
461
],
[
460,
462
],
[
462,
463
],
[
460,
464
],
[
464,
465
],
[
460,
466
],
[
466,
467
],
[
466,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
460,
472
],
[
472,
473
],
[
472,
474
],
[
474,
475
],
[
475,
476
],
[
476,
477
],
[
477,
478
],
[
477,
479
],
[
476,
480
],
[
480,
481
],
[
481,
482
],
[
482,
483
],
[
475,
484
],
[
484,
485
],
[
485,
486
],
[
486,
487
],
[
486,
488
],
[
488,
489
],
[
489,
490
],
[
490,
491
],
[
485,
492
],
[
492,
493
],
[
493,
494
],
[
493,
495
],
[
474,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
460,
500
],
[
500,
501
],
[
500,
502
],
[
502,
503
],
[
503,
504
],
[
504,
505
],
[
505,
506
],
[
504,
507
],
[
507,
508
],
[
460,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
512,
513
],
[
513,
514
],
[
514,
515
],
[
513,
516
],
[
516,
517
],
[
460,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
521,
522
],
[
522,
523
],
[
523,
524
],
[
522,
525
],
[
525,
526
],
[
460,
527
],
[
527,
528
],
[
527,
529
],
[
529,
530
],
[
530,
531
],
[
530,
532
],
[
529,
533
],
[
533,
534
],
[
534,
535
],
[
534,
536
],
[
536,
537
],
[
537,
538
],
[
538,
539
],
[
533,
540
],
[
540,
541
],
[
541,
542
],
[
541,
543
],
[
543,
544
],
[
544,
545
],
[
529,
546
],
[
546,
547
],
[
0,
548
],
[
548,
549
],
[
548,
550
]
]
| [
"import java.io.*;\nimport java.util.*;\nimport java.math.*;\nimport java.awt.Point;\n \npublic class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\t/*int Q = sc.ni();\n\t\tfor (int q = 0; q < Q; q++) {\n\t\t\tint N = sc.ni();\n\t\t}*/\n\t\t\n\t\tint N = sc.ni();\n\t\tint K = sc.ni();\n\t\tint[] nums = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();\n\t\tnums = shuffle(nums);\n\t\tArrays.sort(nums);\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; i++)\n\t\t\tans += nums[i];\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next() { \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }\n \n int ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \n return Double.parseDouble(next()); \n } \n \n String nextLine() {\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }\n }\n}",
"Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t}",
"@Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }",
"compare",
"{\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }",
"if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;",
"a[0] < b[0]",
"a[0]",
"a",
"0",
"b[0]",
"b",
"0",
"return -1;",
"-1",
"1",
"return 1;",
"1",
"long[] a",
"a",
"long[] b",
"b",
"Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t}",
"@Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }",
"compare",
"{\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }",
"return a[0]-b[0]; //ascending order",
"a[0]-b[0]",
"a[0]",
"a",
"0",
"b[0]",
"b",
"0",
"int[] a",
"a",
"int[] b",
"b",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.awt.Point;",
"Point",
"java.awt",
"public class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\t/*int Q = sc.ni();\n\t\tfor (int q = 0; q < Q; q++) {\n\t\t\tint N = sc.ni();\n\t\t}*/\n\t\t\n\t\tint N = sc.ni();\n\t\tint K = sc.ni();\n\t\tint[] nums = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();\n\t\tnums = shuffle(nums);\n\t\tArrays.sort(nums);\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; i++)\n\t\t\tans += nums[i];\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next() { \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }\n \n int ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \n return Double.parseDouble(next()); \n } \n \n String nextLine() {\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }\n }\n}",
"Main",
"static final long MOD = 998244353L;",
"MOD",
"998244353L",
"//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";",
"letters",
"\"abcdefghijklmnopqrstuvwxyz\"",
"//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;",
"INF",
"1000000007",
"public static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\t/*int Q = sc.ni();\n\t\tfor (int q = 0; q < Q; q++) {\n\t\t\tint N = sc.ni();\n\t\t}*/\n\t\t\n\t\tint N = sc.ni();\n\t\tint K = sc.ni();\n\t\tint[] nums = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();\n\t\tnums = shuffle(nums);\n\t\tArrays.sort(nums);\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; i++)\n\t\t\tans += nums[i];\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}",
"main",
"{\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\t/*int Q = sc.ni();\n\t\tfor (int q = 0; q < Q; q++) {\n\t\t\tint N = sc.ni();\n\t\t}*/\n\t\t\n\t\tint N = sc.ni();\n\t\tint K = sc.ni();\n\t\tint[] nums = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();\n\t\tnums = shuffle(nums);\n\t\tArrays.sort(nums);\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; i++)\n\t\t\tans += nums[i];\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"int N = sc.ni();",
"N",
"sc.ni()",
"sc.ni",
"sc",
"int K = sc.ni();",
"K",
"sc.ni()",
"sc.ni",
"sc",
"int[] nums = new int[N];",
"nums",
"new int[N]",
"N",
"for (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"nums[i] = sc.ni();",
"nums[i] = sc.ni()",
"nums[i]",
"nums",
"i",
"sc.ni()",
"sc.ni",
"sc",
"nums = shuffle(nums)",
"nums",
"shuffle(nums)",
"shuffle",
"nums",
"Arrays.sort(nums)",
"Arrays.sort",
"Arrays",
"nums",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < K; i++)\n\t\t\tans += nums[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"ans += nums[i];",
"ans += nums[i]",
"ans",
"nums[i]",
"nums",
"i",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"public static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}",
"dist",
"{\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}",
"return (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));",
"(Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]))",
"Math.abs(p2[0]-p1[0])",
"Math.abs",
"Math",
"p2[0]-p1[0]",
"p2[0]",
"p2",
"0",
"p1[0]",
"p1",
"0",
"Math.abs(p2[1]-p1[1])",
"Math.abs",
"Math",
"p2[1]-p1[1]",
"p2[1]",
"p2",
"1",
"p1[1]",
"p1",
"1",
"long[] p1",
"p1",
"long[] p2",
"p2",
"//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}",
"gcd",
"{\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}",
"if (a < b) return gcd(b,a);",
"a < b",
"a",
"b",
"return gcd(b,a);",
"gcd(b,a)",
"gcd",
"b",
"a",
"if (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b,a%b);",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}",
"power",
"{ \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}",
"if (y < 0) return 0L;",
"y < 0",
"y",
"0",
"return 0L;",
"0L",
"long ans = 1;",
"ans",
"1",
"x %= m",
"x",
"m",
"while (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t}",
"y > 0",
"y",
"0",
"{ \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t}",
"if(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m;",
"y % 2 == 1",
"y % 2",
"y",
"2",
"1",
"ans = (ans * x) % m",
"ans",
"(ans * x) % m",
"(ans * x)",
"ans",
"x",
"m",
"y /= 2",
"y",
"2",
"x = (x * x) % m",
"x",
"(x * x) % m",
"(x * x)",
"x",
"x",
"m",
"return ans;",
"ans",
"long x",
"x",
"long y",
"y",
"long m",
"m",
"public static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}",
"shuffle",
"{\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}",
"Random rgen = new Random();",
"rgen",
"new Random()",
"for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int randomPosition = rgen.nextInt(array.length);",
"randomPosition",
"rgen.nextInt(array.length)",
"rgen.nextInt",
"rgen",
"array.length",
"array",
"array.length",
"int temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[randomPosition]",
"array[i]",
"array",
"i",
"array[randomPosition]",
"array",
"randomPosition",
"array[randomPosition] = temp",
"array[randomPosition]",
"array",
"randomPosition",
"temp",
"return array;",
"array",
"int[] array",
"array",
"public static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}",
"shuffle",
"{\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}",
"Random rgen = new Random();",
"rgen",
"new Random()",
"for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int randomPosition = rgen.nextInt(array.length);",
"randomPosition",
"rgen.nextInt(array.length)",
"rgen.nextInt",
"rgen",
"array.length",
"array",
"array.length",
"long temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[randomPosition]",
"array[i]",
"array",
"i",
"array[randomPosition]",
"array",
"randomPosition",
"array[randomPosition] = temp",
"array[randomPosition]",
"array",
"randomPosition",
"temp",
"return array;",
"array",
"long[] array",
"array",
"public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}",
"sort",
"{\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}",
"Random rgen = new Random();",
"rgen",
"new Random()",
"for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int randomPosition = rgen.nextInt(array.length);",
"randomPosition",
"rgen.nextInt(array.length)",
"rgen.nextInt",
"rgen",
"array.length",
"array",
"array.length",
"int[] temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[randomPosition]",
"array[i]",
"array",
"i",
"array[randomPosition]",
"array",
"randomPosition",
"array[randomPosition] = temp",
"array[randomPosition]",
"array",
"randomPosition",
"temp",
"Arrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t})",
"Arrays.sort",
"Arrays",
"array",
"new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t}",
"return array;",
"array",
"int[][] array",
"array",
"public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}",
"sort",
"{\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}",
"Random rgen = new Random();",
"rgen",
"new Random()",
"for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}",
"int randomPosition = rgen.nextInt(array.length);",
"randomPosition",
"rgen.nextInt(array.length)",
"rgen.nextInt",
"rgen",
"array.length",
"array",
"array.length",
"long[] temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[randomPosition]",
"array[i]",
"array",
"i",
"array[randomPosition]",
"array",
"randomPosition",
"array[randomPosition] = temp",
"array[randomPosition]",
"array",
"randomPosition",
"temp",
"Arrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t})",
"Arrays.sort",
"Arrays",
"array",
"new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t}",
"return array;",
"array",
"long[][] array",
"array",
"static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next() { \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }\n \n int ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \n return Double.parseDouble(next()); \n } \n \n String nextLine() {\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }\n }",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n }",
"FastScanner",
"{ \n br = new BufferedReader(new InputStreamReader(System.in)); \n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() { \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n }",
"try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n }",
"catch (IOException e) { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int ni() { \n return Integer.parseInt(next()); \n }",
"ni",
"{ \n return Integer.parseInt(next()); \n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nl() { \n return Long.parseLong(next()); \n }",
"nl",
"{ \n return Long.parseLong(next()); \n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nd() { \n return Double.parseDouble(next()); \n }",
"nd",
"{ \n return Double.parseDouble(next()); \n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }",
"nextLine",
"{\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n }",
"catch (IOException e) {\n e.printStackTrace(); \n }",
"IOException e",
"{\n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n str = br.readLine(); \n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\t/*int Q = sc.ni();\n\t\tfor (int q = 0; q < Q; q++) {\n\t\t\tint N = sc.ni();\n\t\t}*/\n\t\t\n\t\tint N = sc.ni();\n\t\tint K = sc.ni();\n\t\tint[] nums = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();\n\t\tnums = shuffle(nums);\n\t\tArrays.sort(nums);\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; i++)\n\t\t\tans += nums[i];\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next() { \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }\n \n int ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \n return Double.parseDouble(next()); \n } \n \n String nextLine() {\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }\n }\n}",
"public class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\t/*int Q = sc.ni();\n\t\tfor (int q = 0; q < Q; q++) {\n\t\t\tint N = sc.ni();\n\t\t}*/\n\t\t\n\t\tint N = sc.ni();\n\t\tint K = sc.ni();\n\t\tint[] nums = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tnums[i] = sc.ni();\n\t\tnums = shuffle(nums);\n\t\tArrays.sort(nums);\n\t\tint ans = 0;\n\t\tfor (int i = 0; i < K; i++)\n\t\t\tans += nums[i];\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next() { \n while (st == null || !st.hasMoreElements()) { \n try { \n st = new StringTokenizer(br.readLine());\n } catch (IOException e) { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }\n \n int ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \n return Double.parseDouble(next()); \n } \n \n String nextLine() {\n String str = \"\"; \n try { \n str = br.readLine(); \n } catch (IOException e) {\n e.printStackTrace(); \n } \n return str;\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.Point;
public class Main {
static final long MOD = 998244353L;
//static final long INF = 1000000000000000007L;
static String letters = "abcdefghijklmnopqrstuvwxyz";
//static final long MOD = 1000000007L;
static final int INF = 1000000007;
public static void main(String[] args) {
FastScanner sc = new FastScanner();
PrintWriter pw = new PrintWriter(System.out);
/*int Q = sc.ni();
for (int q = 0; q < Q; q++) {
int N = sc.ni();
}*/
int N = sc.ni();
int K = sc.ni();
int[] nums = new int[N];
for (int i = 0; i < N; i++)
nums[i] = sc.ni();
nums = shuffle(nums);
Arrays.sort(nums);
int ans = 0;
for (int i = 0; i < K; i++)
ans += nums[i];
pw.println(ans);
pw.close();
}
public static long dist(long[] p1, long[] p2) {
return (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));
}
//Find the GCD of two numbers
public static long gcd(long a, long b) {
if (a < b) return gcd(b,a);
if (b == 0)
return a;
else
return gcd(b,a%b);
}
//Fast exponentiation (x^y mod m)
public static long power(long x, long y, long m) {
if (y < 0) return 0L;
long ans = 1;
x %= m;
while (y > 0) {
if(y % 2 == 1)
ans = (ans * x) % m;
y /= 2;
x = (x * x) % m;
}
return ans;
}
public static int[] shuffle(int[] array) {
Random rgen = new Random();
for (int i = 0; i < array.length; i++) {
int randomPosition = rgen.nextInt(array.length);
int temp = array[i];
array[i] = array[randomPosition];
array[randomPosition] = temp;
}
return array;
}
public static long[] shuffle(long[] array) {
Random rgen = new Random();
for (int i = 0; i < array.length; i++) {
int randomPosition = rgen.nextInt(array.length);
long temp = array[i];
array[i] = array[randomPosition];
array[randomPosition] = temp;
}
return array;
}
public static int[][] sort(int[][] array) {
//Sort an array (immune to quicksort TLE)
Random rgen = new Random();
for (int i = 0; i < array.length; i++) {
int randomPosition = rgen.nextInt(array.length);
int[] temp = array[i];
array[i] = array[randomPosition];
array[randomPosition] = temp;
}
Arrays.sort(array, new Comparator<int[]>() {
@Override
public int compare(int[] a, int[] b) {
return a[0]-b[0]; //ascending order
}
});
return array;
}
public static long[][] sort(long[][] array) {
//Sort an array (immune to quicksort TLE)
Random rgen = new Random();
for (int i = 0; i < array.length; i++) {
int randomPosition = rgen.nextInt(array.length);
long[] temp = array[i];
array[i] = array[randomPosition];
array[randomPosition] = temp;
}
Arrays.sort(array, new Comparator<long[]>() {
@Override
public int compare(long[] a, long[] b) {
if (a[0] < b[0])
return -1;
else
return 1;
}
});
return array;
}
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int ni() {
return Integer.parseInt(next());
}
long nl() {
return Long.parseLong(next());
}
double nd() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
100,
26
],
[
100,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
29,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
29,
43
],
[
43,
44
],
[
43,
45
],
[
29,
46
],
[
46,
47
],
[
46,
48
],
[
29,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
29,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
29,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
29,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
27,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.io.BufferedReader;\nimport java.io.*;\nimport java.util.*;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Collections;\nimport java.util.Arrays;\n\npublic class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n int sum = 0;\n\n for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n Collections.sort(list);\n\n for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n\n \n \n\n \n\n\n \n \n\n\n \n\n\n \n \n\n\n \n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Iterator;",
"Iterator",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n int sum = 0;\n\n for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n Collections.sort(list);\n\n for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n\n \n \n\n \n\n\n \n \n\n\n \n\n\n \n \n\n\n \n\t}\n}",
"Main",
"public static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n int sum = 0;\n\n for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n Collections.sort(list);\n\n for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n\n \n \n\n \n\n\n \n \n\n\n \n\n\n \n \n\n\n \n\t}",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n int sum = 0;\n\n for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n Collections.sort(list);\n\n for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n\n \n \n\n \n\n\n \n \n\n\n \n\n\n \n \n\n\n \n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"int sum = 0;",
"sum",
"0",
"for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n list.add(sc.nextInt());\n }",
"{\n list.add(sc.nextInt());\n }",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n sum += list.get(i);\n }",
"{\n sum += list.get(i);\n }",
"sum += list.get(i)",
"sum",
"list.get(i)",
"list.get",
"list",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"final String[] args",
"args",
"public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n int sum = 0;\n\n for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n Collections.sort(list);\n\n for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n\n \n \n\n \n\n\n \n \n\n\n \n\n\n \n \n\n\n \n\t}\n}",
"public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n int sum = 0;\n\n for(int i = 0; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n Collections.sort(list);\n\n for(int i = 0; i < k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n\n \n \n\n \n\n\n \n \n\n\n \n\n\n \n \n\n\n \n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;
public class Main {
public static void main(final String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
List<Integer> list = new ArrayList<>();
int sum = 0;
for(int i = 0; i < n ; i++){
list.add(sc.nextInt());
}
Collections.sort(list);
for(int i = 0; i < k ; i++){
sum += list.get(i);
}
System.out.println(sum);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
42,
2,
40,
13,
17,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
14,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
14,
47
],
[
47,
48
],
[
47,
49
],
[
14,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
14,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
12,
75
],
[
75,
76
]
]
| [
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Scanner;\n\nclass Main{\n public static void main(String[] args) throws Exception{\n\t Scanner sc = new Scanner(System.in);\n\t int n = sc.nextInt();\n\t int k = sc.nextInt();\n\t ArrayList<Integer> a = new ArrayList<Integer>();\n\t while(n-- > 0) {\n\t\t a.add(sc.nextInt());\n\t }\n\t Collections.sort(a);\n\t int ans = 0;\n\t for(int i = 0; i < k; i++) {\n\t\t ans += a.get(i);\n\t }\n\t System.out.println(ans);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args) throws Exception{\n\t Scanner sc = new Scanner(System.in);\n\t int n = sc.nextInt();\n\t int k = sc.nextInt();\n\t ArrayList<Integer> a = new ArrayList<Integer>();\n\t while(n-- > 0) {\n\t\t a.add(sc.nextInt());\n\t }\n\t Collections.sort(a);\n\t int ans = 0;\n\t for(int i = 0; i < k; i++) {\n\t\t ans += a.get(i);\n\t }\n\t System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception{\n\t Scanner sc = new Scanner(System.in);\n\t int n = sc.nextInt();\n\t int k = sc.nextInt();\n\t ArrayList<Integer> a = new ArrayList<Integer>();\n\t while(n-- > 0) {\n\t\t a.add(sc.nextInt());\n\t }\n\t Collections.sort(a);\n\t int ans = 0;\n\t for(int i = 0; i < k; i++) {\n\t\t ans += a.get(i);\n\t }\n\t System.out.println(ans);\n }",
"main",
"{\n\t Scanner sc = new Scanner(System.in);\n\t int n = sc.nextInt();\n\t int k = sc.nextInt();\n\t ArrayList<Integer> a = new ArrayList<Integer>();\n\t while(n-- > 0) {\n\t\t a.add(sc.nextInt());\n\t }\n\t Collections.sort(a);\n\t int ans = 0;\n\t for(int i = 0; i < k; i++) {\n\t\t ans += a.get(i);\n\t }\n\t System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<Integer> a = new ArrayList<Integer>();",
"a",
"new ArrayList<Integer>()",
"while(n-- > 0) {\n\t\t a.add(sc.nextInt());\n\t }",
"n-- > 0",
"n--",
"n",
"0",
"{\n\t\t a.add(sc.nextInt());\n\t }",
"a.add(sc.nextInt())",
"a.add",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Collections.sort(a)",
"Collections.sort",
"Collections",
"a",
"int ans = 0;",
"ans",
"0",
"for(int i = 0; i < k; i++) {\n\t\t ans += a.get(i);\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t ans += a.get(i);\n\t }",
"{\n\t\t ans += a.get(i);\n\t }",
"ans += a.get(i)",
"ans",
"a.get(i)",
"a.get",
"a",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args"
]
| import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main{
public static void main(String[] args) throws Exception{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
ArrayList<Integer> a = new ArrayList<Integer>();
while(n-- > 0) {
a.add(sc.nextInt());
}
Collections.sort(a);
int ans = 0;
for(int i = 0; i < k; i++) {
ans += a.get(i);
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
]
]
| [
"import java.util.*;\n\nclass Main\n{\n public static void main(String [] args)\n {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int [] arr = new int [n];\n \n for(int i = 0; i < n;i++)\n \tarr[i] = s.nextInt();\n \n Arrays.sort(arr);\n \n int ans = 0;\n \n for(int i = 0; i < k; i++)\n ans += arr[i];\n \n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String [] args)\n {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int [] arr = new int [n];\n \n for(int i = 0; i < n;i++)\n \tarr[i] = s.nextInt();\n \n Arrays.sort(arr);\n \n int ans = 0;\n \n for(int i = 0; i < k; i++)\n ans += arr[i];\n \n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String [] args)\n {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int [] arr = new int [n];\n \n for(int i = 0; i < n;i++)\n \tarr[i] = s.nextInt();\n \n Arrays.sort(arr);\n \n int ans = 0;\n \n for(int i = 0; i < k; i++)\n ans += arr[i];\n \n System.out.println(ans);\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int [] arr = new int [n];\n \n for(int i = 0; i < n;i++)\n \tarr[i] = s.nextInt();\n \n Arrays.sort(arr);\n \n int ans = 0;\n \n for(int i = 0; i < k; i++)\n ans += arr[i];\n \n System.out.println(ans);\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int k = s.nextInt();",
"k",
"s.nextInt()",
"s.nextInt",
"s",
"int [] arr = new int [n];",
"arr",
"new int [n]",
"n",
"for(int i = 0; i < n;i++)\n \tarr[i] = s.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = s.nextInt();",
"arr[i] = s.nextInt()",
"arr[i]",
"arr",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int ans = 0;",
"ans",
"0",
"for(int i = 0; i < k; i++)\n ans += arr[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"ans += arr[i];",
"ans += arr[i]",
"ans",
"arr[i]",
"arr",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String [] args",
"args"
]
| import java.util.*;
class Main
{
public static void main(String [] args)
{
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int k = s.nextInt();
int [] arr = new int [n];
for(int i = 0; i < n;i++)
arr[i] = s.nextInt();
Arrays.sort(arr);
int ans = 0;
for(int i = 0; i < k; i++)
ans += arr[i];
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
14,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
14,
55
],
[
55,
56
],
[
55,
57
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
14,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
14,
81
],
[
81,
82
],
[
82,
83
],
[
12,
84
],
[
84,
85
]
]
| [
"/*package whatever //do not write package name here */\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\nclass Main {\n\tpublic static void main (String[] args) {\n// \t\tSystem.out.println(\"GfG!\");\n Scanner input=new Scanner(System.in);\n int n=input.nextInt();\n int k=input.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++)\n p[i]=input.nextInt();\n Arrays.sort(p);\n int ans=0;\n for(int i=0;i<k;i++)\n ans+=p[i];\n System.out.println(ans);\n input.close();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n\tpublic static void main (String[] args) {\n// \t\tSystem.out.println(\"GfG!\");\n Scanner input=new Scanner(System.in);\n int n=input.nextInt();\n int k=input.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++)\n p[i]=input.nextInt();\n Arrays.sort(p);\n int ans=0;\n for(int i=0;i<k;i++)\n ans+=p[i];\n System.out.println(ans);\n input.close();\n\t}\n}",
"Main",
"public static void main (String[] args) {\n// \t\tSystem.out.println(\"GfG!\");\n Scanner input=new Scanner(System.in);\n int n=input.nextInt();\n int k=input.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++)\n p[i]=input.nextInt();\n Arrays.sort(p);\n int ans=0;\n for(int i=0;i<k;i++)\n ans+=p[i];\n System.out.println(ans);\n input.close();\n\t}",
"main",
"{\n// \t\tSystem.out.println(\"GfG!\");\n Scanner input=new Scanner(System.in);\n int n=input.nextInt();\n int k=input.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++)\n p[i]=input.nextInt();\n Arrays.sort(p);\n int ans=0;\n for(int i=0;i<k;i++)\n ans+=p[i];\n System.out.println(ans);\n input.close();\n\t}",
"Scanner input=new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int n=input.nextInt();",
"n",
"input.nextInt()",
"input.nextInt",
"input",
"int k=input.nextInt();",
"k",
"input.nextInt()",
"input.nextInt",
"input",
"int[] p=new int[n];",
"p",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n p[i]=input.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"p[i]=input.nextInt();",
"p[i]=input.nextInt()",
"p[i]",
"p",
"i",
"input.nextInt()",
"input.nextInt",
"input",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"int ans=0;",
"ans",
"0",
"for(int i=0;i<k;i++)\n ans+=p[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"ans+=p[i];",
"ans+=p[i]",
"ans",
"p[i]",
"p",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"input.close()",
"input.close",
"input",
"String[] args",
"args"
]
| /*package whatever //do not write package name here */
import java.util.*;
import java.lang.*;
import java.io.*;
class Main {
public static void main (String[] args) {
// System.out.println("GfG!");
Scanner input=new Scanner(System.in);
int n=input.nextInt();
int k=input.nextInt();
int[] p=new int[n];
for(int i=0;i<n;i++)
p[i]=input.nextInt();
Arrays.sort(p);
int ans=0;
for(int i=0;i<k;i++)
ans+=p[i];
System.out.println(ans);
input.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
100,
8
],
[
100,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
11,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
11,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
11,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
11,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
9,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int[] num = new int[1000];\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;\n for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();\n Arrays.sort(num);\n int sum = 0;\n for(int i = 0;i < k ;i++)\n sum += num[i];\n System.out.println(sum);\n\n\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int[] num = new int[1000];\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;\n for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();\n Arrays.sort(num);\n int sum = 0;\n for(int i = 0;i < k ;i++)\n sum += num[i];\n System.out.println(sum);\n\n\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int[] num = new int[1000];\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;\n for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();\n Arrays.sort(num);\n int sum = 0;\n for(int i = 0;i < k ;i++)\n sum += num[i];\n System.out.println(sum);\n\n\n }",
"main",
"{\n\n Scanner scanner = new Scanner(System.in);\n int[] num = new int[1000];\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;\n for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();\n Arrays.sort(num);\n int sum = 0;\n for(int i = 0;i < k ;i++)\n sum += num[i];\n System.out.println(sum);\n\n\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int[] num = new int[1000];",
"num",
"new int[1000]",
"1000",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int k = scanner.nextInt();",
"k",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 1000",
"i",
"1000",
"i++",
"i++",
"i",
"num[i] = Integer.MAX_VALUE;",
"num[i] = Integer.MAX_VALUE",
"num[i]",
"num",
"i",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"num[i] = scanner.nextInt();",
"num[i] = scanner.nextInt()",
"num[i]",
"num",
"i",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Arrays.sort(num)",
"Arrays.sort",
"Arrays",
"num",
"int sum = 0;",
"sum",
"0",
"for(int i = 0;i < k ;i++)\n sum += num[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"sum += num[i];",
"sum += num[i]",
"sum",
"num[i]",
"num",
"i",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int[] num = new int[1000];\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;\n for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();\n Arrays.sort(num);\n int sum = 0;\n for(int i = 0;i < k ;i++)\n sum += num[i];\n System.out.println(sum);\n\n\n }\n}",
"public class Main {\n\n\n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int[] num = new int[1000];\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n for(int i = 0;i < 1000;i++)\n num[i] = Integer.MAX_VALUE;\n for(int i = 0;i < n;i++)\n num[i] = scanner.nextInt();\n Arrays.sort(num);\n int sum = 0;\n for(int i = 0;i < k ;i++)\n sum += num[i];\n System.out.println(sum);\n\n\n }\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int[] num = new int[1000];
int n = scanner.nextInt();
int k = scanner.nextInt();
for(int i = 0;i < 1000;i++)
num[i] = Integer.MAX_VALUE;
for(int i = 0;i < n;i++)
num[i] = scanner.nextInt();
Arrays.sort(num);
int sum = 0;
for(int i = 0;i < k ;i++)
sum += num[i];
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
9,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int count = 0;\n for (int i = 0; i < k; i++) {\n count+=arr[i];\n }\n System.out.println(count);\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int count = 0;\n for (int i = 0; i < k; i++) {\n count+=arr[i];\n }\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int count = 0;\n for (int i = 0; i < k; i++) {\n count+=arr[i];\n }\n System.out.println(count);\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int count = 0;\n for (int i = 0; i < k; i++) {\n count+=arr[i];\n }\n System.out.println(count);\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int k = s.nextInt();",
"k",
"s.nextInt()",
"s.nextInt",
"s",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = s.nextInt();\n }",
"{\n arr[i] = s.nextInt();\n }",
"arr[i] = s.nextInt()",
"arr[i]",
"arr",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < k; i++) {\n count+=arr[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n count+=arr[i];\n }",
"{\n count+=arr[i];\n }",
"count+=arr[i]",
"count",
"arr[i]",
"arr",
"i",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int count = 0;\n for (int i = 0; i < k; i++) {\n count+=arr[i];\n }\n System.out.println(count);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int k = s.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i <n ; i++) {\n arr[i] = s.nextInt();\n }\n Arrays.sort(arr);\n int count = 0;\n for (int i = 0; i < k; i++) {\n count+=arr[i];\n }\n System.out.println(count);\n }\n}",
"Main"
]
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int k = s.nextInt();
int[] arr = new int[n];
for (int i = 0; i <n ; i++) {
arr[i] = s.nextInt();
}
Arrays.sort(arr);
int count = 0;
for (int i = 0; i < k; i++) {
count+=arr[i];
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
13,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
4,
13,
4,
18,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
4,
13,
17,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
4,
18,
13,
17,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
459,
8
],
[
459,
9
],
[
9,
10
],
[
459,
11
],
[
11,
12
],
[
459,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
15,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
15,
32
],
[
32,
33
],
[
32,
34
],
[
15,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
15,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
459,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
58,
65
],
[
65,
66
],
[
65,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
68,
73
],
[
73,
74
],
[
58,
75
],
[
75,
76
],
[
76,
77
],
[
56,
78
],
[
78,
79
],
[
459,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
83,
93
],
[
93,
94
],
[
94,
95
],
[
83,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
97,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
97,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
97,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
80,
124
],
[
124,
125
],
[
459,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
129,
139
],
[
139,
140
],
[
140,
141
],
[
129,
142
],
[
143,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
146,
150
],
[
150,
151
],
[
150,
152
],
[
143,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
155,
157
],
[
143,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
162,
163
],
[
162,
164
],
[
143,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
165,
169
],
[
126,
170
],
[
170,
171
],
[
459,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
172,
176
],
[
176,
177
],
[
172,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
178,
184
],
[
184,
185
],
[
172,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
186,
192
],
[
192,
193
],
[
172,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
197,
206
],
[
206,
207
],
[
206,
208
],
[
196,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
172,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
215,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
220,
225
],
[
225,
226
],
[
225,
227
],
[
220,
228
],
[
228,
229
],
[
229,
230
],
[
220,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
215,
238
],
[
238,
239
],
[
213,
240
],
[
240,
241
],
[
172,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
244,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
249,
254
],
[
254,
255
],
[
254,
256
],
[
249,
257
],
[
257,
258
],
[
258,
259
],
[
249,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
261,
265
],
[
265,
266
],
[
244,
267
],
[
267,
268
],
[
242,
269
],
[
269,
270
],
[
172,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
278,
283
],
[
283,
284
],
[
283,
285
],
[
278,
286
],
[
286,
287
],
[
287,
288
],
[
278,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
290,
294
],
[
294,
295
],
[
273,
296
],
[
296,
297
],
[
296,
298
],
[
273,
299
],
[
299,
300
],
[
300,
301
],
[
299,
302
],
[
273,
303
],
[
303,
304
],
[
271,
305
],
[
305,
306
],
[
172,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
310,
311
],
[
310,
312
],
[
309,
314
],
[
314,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
314,
319
],
[
319,
320
],
[
319,
321
],
[
314,
322
],
[
322,
323
],
[
323,
324
],
[
314,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
330
],
[
330,
331
],
[
309,
332
],
[
332,
333
],
[
332,
334
],
[
309,
335
],
[
335,
336
],
[
336,
337
],
[
335,
338
],
[
309,
339
],
[
339,
340
],
[
307,
341
],
[
341,
342
],
[
172,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
346,
347
],
[
346,
348
],
[
345,
350
],
[
350,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
350,
355
],
[
355,
356
],
[
355,
357
],
[
350,
358
],
[
358,
359
],
[
359,
360
],
[
350,
361
],
[
361,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
362,
366
],
[
366,
367
],
[
345,
368
],
[
368,
369
],
[
343,
370
],
[
370,
371
],
[
172,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
374,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
381,
383
],
[
379,
384
],
[
384,
385
],
[
384,
386
],
[
379,
387
],
[
387,
388
],
[
388,
389
],
[
379,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
395,
396
],
[
374,
397
],
[
397,
398
],
[
372,
399
],
[
399,
400
],
[
172,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
406,
407
],
[
172,
408
],
[
408,
409
],
[
408,
410
],
[
410,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
412,
415
],
[
415,
416
],
[
172,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
422,
423
],
[
421,
424
],
[
424,
425
],
[
172,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
430,
434
],
[
172,
435
],
[
435,
436
],
[
435,
437
],
[
437,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
439,
442
],
[
442,
443
],
[
172,
444
],
[
444,
445
],
[
444,
446
],
[
446,
447
],
[
447,
448
],
[
448,
449
],
[
449,
450
],
[
172,
451
],
[
451,
452
],
[
451,
453
],
[
453,
454
],
[
454,
455
],
[
455,
456
],
[
454,
457
],
[
0,
458
],
[
458,
459
],
[
458,
460
]
]
| [
"import java.io.*;\nimport java.util.*;\npublic class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tint[]in=sc.intSortedArr(n);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++)ans+=in[i];\n\t\tpw.println(ans);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tint[]in=sc.intSortedArr(n);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++)ans+=in[i];\n\t\tpw.println(ans);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"Main",
"static PrintWriter pw;",
"pw",
"static MScanner sc;",
"sc",
"static void main() throws Exception{\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tint[]in=sc.intSortedArr(n);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++)ans+=in[i];\n\t\tpw.println(ans);\n\t}",
"main",
"{\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tint[]in=sc.intSortedArr(n);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++)ans+=in[i];\n\t\tpw.println(ans);\n\t}",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[]in=sc.intSortedArr(n);",
"in",
"sc.intSortedArr(n)",
"sc.intSortedArr",
"sc",
"n",
"int ans=0;",
"ans",
"0",
"for(int i=0;i<k;i++)ans+=in[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"ans+=in[i];",
"ans+=in[i]",
"ans",
"in[i]",
"in",
"i",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"public static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}",
"main",
"{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}",
"pw=new PrintWriter(System.out)",
"pw",
"new PrintWriter(System.out)",
"sc = new MScanner(System.in)",
"sc",
"new MScanner(System.in)",
"int tc=1;",
"tc",
"1",
"while(tc-->0)\n\t\t\tmain();",
"tc-->0",
"tc--",
"tc",
"0",
"main()",
"main",
"pw.flush()",
"pw.flush",
"pw",
"String[] args",
"args",
"static void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"shuffle",
"{\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"for(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in.length",
"i",
"in.length",
"in",
"in.length",
"i++",
"i++",
"i",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int idx=(int)(Math.random()*in.length);",
"idx",
"(int)(Math.random()*in.length)",
"Math.random()",
"Math.random",
"Math",
"in.length",
"in",
"in.length",
"int tmp=in[i];",
"tmp",
"in[i]",
"in",
"i",
"in[i]=in[idx]",
"in[i]",
"in",
"i",
"in[idx]",
"in",
"idx",
"in[idx]=tmp",
"in[idx]",
"in",
"idx",
"tmp",
"int[]in",
"in",
"static void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"shuffle",
"{\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"for(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in.length",
"i",
"in.length",
"in",
"in.length",
"i++",
"i++",
"i",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int idx=(int)(Math.random()*in.length);",
"idx",
"(int)(Math.random()*in.length)",
"Math.random()",
"Math.random",
"Math",
"in.length",
"in",
"in.length",
"long tmp=in[i];",
"tmp",
"in[i]",
"in",
"i",
"in[i]=in[idx]",
"in[i]",
"in",
"i",
"in[idx]",
"in",
"idx",
"in[idx]=tmp",
"in[idx]",
"in",
"idx",
"tmp",
"long[]in",
"in",
"static class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}",
"MScanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}",
"MScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(system))",
"br",
"new BufferedReader(new InputStreamReader(system))",
"InputStream system",
"system",
"public MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"MScanner",
"{\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"br = new BufferedReader(new FileReader(file))",
"br",
"new BufferedReader(new FileReader(file))",
"String file",
"file",
"public String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"intArr",
"{\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"int[]in=new int[n];",
"in",
"new int[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"return in;",
"in",
"int n",
"n",
"public long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"longArr",
"{\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"long[]in=new long[n];",
"in",
"new long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"return in;",
"in",
"int n",
"n",
"public int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"intSortedArr",
"{\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"int[]in=new int[n];",
"in",
"new int[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"shuffle(in)",
"shuffle",
"in",
"Arrays.sort(in)",
"Arrays.sort",
"Arrays",
"in",
"return in;",
"in",
"int n",
"n",
"public long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"longSortedArr",
"{\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"long[]in=new long[n];",
"in",
"new long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"shuffle(in)",
"shuffle",
"in",
"Arrays.sort(in)",
"Arrays.sort",
"Arrays",
"in",
"return in;",
"in",
"int n",
"n",
"public Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"IntegerArr",
"{\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"Integer[]in=new Integer[n];",
"in",
"new Integer[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"return in;",
"in",
"int n",
"n",
"public Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"LongArr",
"{\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"Long[]in=new Long[n];",
"in",
"new Long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"return in;",
"in",
"int n",
"n",
"public String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}",
"nextLine",
"{\n\t\t\treturn br.readLine();\n\t\t}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}",
"nextChar",
"{\n\t\t\treturn next().charAt(0);\n\t\t}",
"return next().charAt(0);",
"next().charAt(0)",
"next().charAt",
"next()",
"next",
"0",
"public long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}",
"ready",
"{\n\t\t\treturn br.ready();\n\t\t}",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"public void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}",
"waitForInput",
"{\n\t\t\tThread.sleep(3000);\n\t\t}",
"Thread.sleep(3000)",
"Thread.sleep",
"Thread",
"3000",
"public class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tint[]in=sc.intSortedArr(n);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++)ans+=in[i];\n\t\tpw.println(ans);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"public class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tint[]in=sc.intSortedArr(n);\n\t\tint ans=0;\n\t\tfor(int i=0;i<k;i++)ans+=in[i];\n\t\tpw.println(ans);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main{
static void main() throws Exception{
int n=sc.nextInt(),k=sc.nextInt();
int[]in=sc.intSortedArr(n);
int ans=0;
for(int i=0;i<k;i++)ans+=in[i];
pw.println(ans);
}
public static void main(String[] args) throws Exception{
pw=new PrintWriter(System.out);
sc = new MScanner(System.in);
int tc=1;
// tc=sc.nextInt();
while(tc-->0)
main();
pw.flush();
}
static PrintWriter pw;
static MScanner sc;
static class MScanner {
StringTokenizer st;
BufferedReader br;
public MScanner(InputStream system) {
br = new BufferedReader(new InputStreamReader(system));
}
public MScanner(String file) throws Exception {
br = new BufferedReader(new FileReader(file));
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int[] intArr(int n) throws IOException {
int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
return in;
}
public long[] longArr(int n) throws IOException {
long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
return in;
}
public int[] intSortedArr(int n) throws IOException {
int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
shuffle(in);
Arrays.sort(in);
return in;
}
public long[] longSortedArr(int n) throws IOException {
long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
shuffle(in);
Arrays.sort(in);
return in;
}
public Integer[] IntegerArr(int n) throws IOException {
Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();
return in;
}
public Long[] LongArr(int n) throws IOException {
Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();
return in;
}
public String nextLine() throws IOException {
return br.readLine();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public char nextChar() throws IOException {
return next().charAt(0);
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public boolean ready() throws IOException {
return br.ready();
}
public void waitForInput() throws InterruptedException {
Thread.sleep(3000);
}
}
static void shuffle(int[]in) {
for(int i=0;i<in.length;i++) {
int idx=(int)(Math.random()*in.length);
int tmp=in[i];
in[i]=in[idx];
in[idx]=tmp;
}
}
static void shuffle(long[]in) {
for(int i=0;i<in.length;i++) {
int idx=(int)(Math.random()*in.length);
long tmp=in[i];
in[i]=in[idx];
in[idx]=tmp;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
88,
8
],
[
88,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
11,
56
],
[
56,
57
],
[
56,
58
],
[
11,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
11,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
9,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint array[] = new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}\n\t\tArrays.sort(array);\n\n\t\tint sum = 0;\n\t\tfor(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint array[] = new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}\n\t\tArrays.sort(array);\n\n\t\tint sum = 0;\n\t\tfor(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint array[] = new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}\n\t\tArrays.sort(array);\n\n\t\tint sum = 0;\n\t\tfor(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint array[] = new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}\n\t\tArrays.sort(array);\n\n\t\tint sum = 0;\n\t\tfor(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int array[] = new int[N];",
"array",
"new int[N]",
"N",
"for(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}",
"{\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}",
"int P = scan.nextInt();",
"P",
"scan.nextInt()",
"scan.nextInt",
"scan",
"array[i] = P",
"array[i]",
"array",
"i",
"P",
"Arrays.sort(array)",
"Arrays.sort",
"Arrays",
"array",
"int sum = 0;",
"sum",
"0",
"for(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<K",
"j",
"K",
"j++",
"j++",
"j",
"{\n\t\t\tsum = sum + array[j];\n\t\t}",
"{\n\t\t\tsum = sum + array[j];\n\t\t}",
"sum = sum + array[j]",
"sum",
"sum + array[j]",
"sum",
"array[j]",
"array",
"j",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint array[] = new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}\n\t\tArrays.sort(array);\n\n\t\tint sum = 0;\n\t\tfor(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint array[] = new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint P = scan.nextInt();\n\t\t\tarray[i] = P;\n\t\t}\n\t\tArrays.sort(array);\n\n\t\tint sum = 0;\n\t\tfor(int j=0;j<K;j++) {\n\t\t\tsum = sum + array[j];\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
int array[] = new int[N];
for(int i=0;i<N;i++) {
int P = scan.nextInt();
array[i] = P;
}
Arrays.sort(array);
int sum = 0;
for(int j=0;j<K;j++) {
sum = sum + array[j];
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n sc.nextLine();\n int[] p = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n Arrays.sort(p);\n for(int i = 0;i<k;i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n sc.nextLine();\n int[] p = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n Arrays.sort(p);\n for(int i = 0;i<k;i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n sc.nextLine();\n int[] p = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n Arrays.sort(p);\n for(int i = 0;i<k;i++){\n ans += p[i];\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n sc.nextLine();\n int[] p = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n Arrays.sort(p);\n for(int i = 0;i<k;i++){\n ans += p[i];\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int[] p = new int[n];",
"p",
"new int[n]",
"n",
"for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n p[i] = sc.nextInt();\n }",
"{\n p[i] = sc.nextInt();\n }",
"p[i] = sc.nextInt()",
"p[i]",
"p",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"Arrays.sort(p)",
"Arrays.sort",
"Arrays",
"p",
"for(int i = 0;i<k;i++){\n ans += p[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans += p[i];\n }",
"{\n ans += p[i];\n }",
"ans += p[i]",
"ans",
"p[i]",
"p",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n sc.nextLine();\n int[] p = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n Arrays.sort(p);\n for(int i = 0;i<k;i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n sc.nextLine();\n int[] p = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n Arrays.sort(p);\n for(int i = 0;i<k;i++){\n ans += p[i];\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
sc.nextLine();
int[] p = new int[n];
for(int i = 0;i<n;i++){
p[i] = sc.nextInt();
}
int ans = 0;
Arrays.sort(p);
for(int i = 0;i<k;i++){
ans += p[i];
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
87,
8
],
[
87,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
11,
51
],
[
51,
52
],
[
51,
53
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
11,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
11,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
9,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int vec[];\n vec = new int[n];\n for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }\n int ans = 0;\n Arrays.sort(vec);\n for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }\n System.out.println(ans);\n }\n}\n ",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int vec[];\n vec = new int[n];\n for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }\n int ans = 0;\n Arrays.sort(vec);\n for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int vec[];\n vec = new int[n];\n for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }\n int ans = 0;\n Arrays.sort(vec);\n for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int vec[];\n vec = new int[n];\n for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }\n int ans = 0;\n Arrays.sort(vec);\n for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }\n System.out.println(ans);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int vec[];",
"vec",
"vec = new int[n]",
"vec",
"new int[n]",
"n",
"for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n vec[i] = scan.nextInt();\n }",
"{\n vec[i] = scan.nextInt();\n }",
"vec[i] = scan.nextInt()",
"vec[i]",
"vec",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int ans = 0;",
"ans",
"0",
"Arrays.sort(vec)",
"Arrays.sort",
"Arrays",
"vec",
"for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans = ans + vec[i];\n }",
"{\n ans = ans + vec[i];\n }",
"ans = ans + vec[i]",
"ans",
"ans + vec[i]",
"ans",
"vec[i]",
"vec",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int vec[];\n vec = new int[n];\n for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }\n int ans = 0;\n Arrays.sort(vec);\n for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }\n System.out.println(ans);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int vec[];\n vec = new int[n];\n for (int i = 0; i < n; i++){\n vec[i] = scan.nextInt();\n }\n int ans = 0;\n Arrays.sort(vec);\n for (int i = 0; i < k; i++){\n ans = ans + vec[i];\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int vec[];
vec = new int[n];
for (int i = 0; i < n; i++){
vec[i] = scan.nextInt();
}
int ans = 0;
Arrays.sort(vec);
for (int i = 0; i < k; i++){
ans = ans + vec[i];
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
42,
40,
4,
13,
13,
30,
0,
13,
13,
0,
13,
4,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
345,
26
],
[
345,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
29,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
29,
43
],
[
43,
44
],
[
43,
45
],
[
29,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
29,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
29,
71
],
[
71,
72
],
[
71,
73
],
[
29,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
29,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
27,
98
],
[
98,
99
],
[
345,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
100,
108
],
[
108,
109
],
[
100,
110
],
[
110,
111
],
[
100,
112
],
[
112,
113
],
[
100,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
114,
122
],
[
122,
123
],
[
100,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
127,
132
],
[
132,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
142,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
138,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
126,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
100,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
169,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
169,
183
],
[
183,
184
],
[
183,
185
],
[
169,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
186,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
192,
195
],
[
191,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
169,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
100,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
206,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
206,
220
],
[
220,
221
],
[
206,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
206,
235
],
[
235,
236
],
[
100,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
242,
243
],
[
239,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
244,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
239,
252
],
[
252,
253
],
[
252,
254
],
[
239,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
259,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
239,
268
],
[
268,
269
],
[
268,
270
],
[
239,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
271,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
278,
282
],
[
282,
283
],
[
282,
284
],
[
277,
285
],
[
285,
286
],
[
276,
287
],
[
287,
288
],
[
287,
289
],
[
276,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
292,
294
],
[
276,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
239,
299
],
[
299,
300
],
[
300,
301
],
[
300,
302
],
[
100,
303
],
[
303,
304
],
[
303,
305
],
[
305,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
306,
310
],
[
310,
311
],
[
311,
312
],
[
312,
313
],
[
311,
314
],
[
305,
315
],
[
315,
316
],
[
319,
317
],
[
329,
318
],
[
326,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
319,
323
],
[
323,
324
],
[
323,
325
],
[
326,
326
],
[
326,
327
],
[
326,
328
],
[
329,
329
],
[
329,
330
],
[
329,
331
],
[
319,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
303,
336
],
[
336,
337
],
[
100,
338
],
[
338,
339
],
[
338,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
0,
344
],
[
344,
345
],
[
344,
346
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.LinkedList;\nimport java.util.PriorityQueue;\nimport java.util.TreeSet;\n \n \n \npublic class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] prices = new int[n];\n for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }\n Arrays.sort(prices);\n int ans = 0;\n for(int i = 0; i < k; i++){\n ans += prices[i];\n }\n\n System.out.println(ans);\n \n }\n \n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n \n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n \n public char nextChar() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }\n \n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.util.LinkedList;",
"LinkedList",
"java.util",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.TreeSet;",
"TreeSet",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] prices = new int[n];\n for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }\n Arrays.sort(prices);\n int ans = 0;\n for(int i = 0; i < k; i++){\n ans += prices[i];\n }\n\n System.out.println(ans);\n \n }\n \n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n \n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n \n public char nextChar() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }\n \n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] prices = new int[n];\n for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }\n Arrays.sort(prices);\n int ans = 0;\n for(int i = 0; i < k; i++){\n ans += prices[i];\n }\n\n System.out.println(ans);\n \n }",
"main",
"{\n InputReader sc = new InputReader(System.in);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] prices = new int[n];\n for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }\n Arrays.sort(prices);\n int ans = 0;\n for(int i = 0; i < k; i++){\n ans += prices[i];\n }\n\n System.out.println(ans);\n \n }",
"InputReader sc = new InputReader(System.in);",
"sc",
"new InputReader(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] prices = new int[n];",
"prices",
"new int[n]",
"n",
"for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n prices[i] = sc.nextInt();\n }",
"{\n prices[i] = sc.nextInt();\n }",
"prices[i] = sc.nextInt()",
"prices[i]",
"prices",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Arrays.sort(prices)",
"Arrays.sort",
"Arrays",
"prices",
"int ans = 0;",
"ans",
"0",
"for(int i = 0; i < k; i++){\n ans += prices[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n ans += prices[i];\n }",
"{\n ans += prices[i];\n }",
"ans += prices[i]",
"ans",
"prices[i]",
"prices",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
" static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n \n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n \n public char nextChar() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }\n \n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"next",
"{\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n return -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }",
"nextStr",
"{\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }",
"int c = next();",
"c",
"next()",
"next",
"while(isSpaceChar(c)){c = next();}",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{c = next();}",
"c = next()",
"c",
"next()",
"next",
"StringBuffer str = new StringBuffer();",
"str",
"new StringBuffer()",
"do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n str.append((char)c);\n c = next();\n }",
"str.append((char)c)",
"str.append",
"str",
"(char)c",
"c = next()",
"c",
"next()",
"next",
"return str.toString();",
"str.toString()",
"str.toString",
"str",
"public char nextChar() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }",
"nextChar",
"{\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }",
"int c = next();",
"c",
"next()",
"next",
"while(isSpaceChar(c)){c = next();}",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{c = next();}",
"c = next()",
"c",
"next()",
"next",
"char ret;",
"ret",
"do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n ret = (char)c;\n c = next();\n }",
"ret = (char)c",
"ret",
"(char)c",
"c = next()",
"c",
"next()",
"next",
"return ret;",
"ret",
"public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = next();",
"c",
"next()",
"next",
"while (isSpaceChar(c))\n c = next();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = next()",
"c",
"next()",
"next",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = next();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = next();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = next()",
"c",
"next()",
"next",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n }",
"if (c < '0' || c > '9')\n throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = next()",
"c",
"next()",
"next",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null)\n return filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"public class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] prices = new int[n];\n for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }\n Arrays.sort(prices);\n int ans = 0;\n for(int i = 0; i < k; i++){\n ans += prices[i];\n }\n\n System.out.println(ans);\n \n }\n \n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n \n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n \n public char nextChar() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }\n \n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] prices = new int[n];\n for(int i = 0; i < n; i++){\n prices[i] = sc.nextInt();\n }\n Arrays.sort(prices);\n int ans = 0;\n for(int i = 0; i < k; i++){\n ans += prices[i];\n }\n\n System.out.println(ans);\n \n }\n \n //ここからテンプレ\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n \n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n \n public int next() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n \n public String nextStr() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n StringBuffer str = new StringBuffer();\n do{\n str.append((char)c);\n c = next();\n }while(!isSpaceChar(c));\n return str.toString();\n }\n \n public char nextChar() {\n int c = next();\n while(isSpaceChar(c)){c = next();}\n char ret;\n do{\n ret = (char)c;\n c = next();\n }while(!isSpaceChar(c));\n return ret;\n }\n \n public int nextInt() {\n int c = next();\n while (isSpaceChar(c))\n c = next();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = next();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = next();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n \n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n \n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) {
InputReader sc = new InputReader(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] prices = new int[n];
for(int i = 0; i < n; i++){
prices[i] = sc.nextInt();
}
Arrays.sort(prices);
int ans = 0;
for(int i = 0; i < k; i++){
ans += prices[i];
}
System.out.println(ans);
}
//ここからテンプレ
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int next() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public String nextStr() {
int c = next();
while(isSpaceChar(c)){c = next();}
StringBuffer str = new StringBuffer();
do{
str.append((char)c);
c = next();
}while(!isSpaceChar(c));
return str.toString();
}
public char nextChar() {
int c = next();
while(isSpaceChar(c)){c = next();}
char ret;
do{
ret = (char)c;
c = next();
}while(!isSpaceChar(c));
return ret;
}
public int nextInt() {
int c = next();
while (isSpaceChar(c))
c = next();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = next();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = next();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
63,
70
],
[
70,
71
],
[
70,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
63,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
86,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
8,
104
],
[
104,
105
],
[
104,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
8,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
8,
131
],
[
131,
132
],
[
132,
133
],
[
6,
134
],
[
134,
135
]
]
| [
"import java.util.Scanner;\n \nclass Main{\n public static void main(String[] args){\n \n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int [] p = new int[N];\n for(int i = 0; i < N; i++){\n p[i] = scan.nextInt();\n }\n int k;\n for(int j = 0; j < N-1; j++){\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }\n \n int sum = 0;\n for(int m = 0; m < K; m++){\n sum += p[m];\n }\n \n System.out.println(sum);\n \n scan.close();\n }\n} ",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args){\n \n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int [] p = new int[N];\n for(int i = 0; i < N; i++){\n p[i] = scan.nextInt();\n }\n int k;\n for(int j = 0; j < N-1; j++){\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }\n \n int sum = 0;\n for(int m = 0; m < K; m++){\n sum += p[m];\n }\n \n System.out.println(sum);\n \n scan.close();\n }\n}",
"Main",
"public static void main(String[] args){\n \n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int [] p = new int[N];\n for(int i = 0; i < N; i++){\n p[i] = scan.nextInt();\n }\n int k;\n for(int j = 0; j < N-1; j++){\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }\n \n int sum = 0;\n for(int m = 0; m < K; m++){\n sum += p[m];\n }\n \n System.out.println(sum);\n \n scan.close();\n }",
"main",
"{\n \n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int K = scan.nextInt();\n int [] p = new int[N];\n for(int i = 0; i < N; i++){\n p[i] = scan.nextInt();\n }\n int k;\n for(int j = 0; j < N-1; j++){\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }\n \n int sum = 0;\n for(int m = 0; m < K; m++){\n sum += p[m];\n }\n \n System.out.println(sum);\n \n scan.close();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int [] p = new int[N];",
"p",
"new int[N]",
"N",
"for(int i = 0; i < N; i++){\n p[i] = scan.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n p[i] = scan.nextInt();\n }",
"{\n p[i] = scan.nextInt();\n }",
"p[i] = scan.nextInt()",
"p[i]",
"p",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k;",
"k",
"for(int j = 0; j < N-1; j++){\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < N-1",
"j",
"N-1",
"N",
"1",
"j++",
"j++",
"j",
"{\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }",
"{\n for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }\n }",
"for(int l = j+1; l < N; l++){\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }",
"int l = j+1;",
"int l = j+1;",
"l",
"j+1",
"j",
"1",
"l < N",
"l",
"N",
"l++",
"l++",
"l",
"{\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }",
"{\n if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }\n }",
"if(p[j] > p[l]){\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }",
"p[j] > p[l]",
"p[j]",
"p",
"j",
"p[l]",
"p",
"l",
"{\n k = p[j];\n p[j] = p[l];\n p[l] = k;\n }",
"k = p[j]",
"k",
"p[j]",
"p",
"j",
"p[j] = p[l]",
"p[j]",
"p",
"j",
"p[l]",
"p",
"l",
"p[l] = k",
"p[l]",
"p",
"l",
"k",
"int sum = 0;",
"sum",
"0",
"for(int m = 0; m < K; m++){\n sum += p[m];\n }",
"int m = 0;",
"int m = 0;",
"m",
"0",
"m < K",
"m",
"K",
"m++",
"m++",
"m",
"{\n sum += p[m];\n }",
"{\n sum += p[m];\n }",
"sum += p[m]",
"sum",
"p[m]",
"p",
"m",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
int [] p = new int[N];
for(int i = 0; i < N; i++){
p[i] = scan.nextInt();
}
int k;
for(int j = 0; j < N-1; j++){
for(int l = j+1; l < N; l++){
if(p[j] > p[l]){
k = p[j];
p[j] = p[l];
p[l] = k;
}
}
}
int sum = 0;
for(int m = 0; m < K; m++){
sum += p[m];
}
System.out.println(sum);
scan.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
94,
8
],
[
94,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
11,
48
],
[
48,
49
],
[
48,
50
],
[
48,
51
],
[
9,
52
],
[
52,
53
],
[
94,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
56,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
54,
89
],
[
89,
90
],
[
54,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\npublic class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint k = s.nextInt();\n\t\tint fruits[] = new int[n];\n\t\tfor(int i=0;i<n;i++) fruits[i] = s.nextInt();\n\t\tsolver(fruits,k);\n\t}\n\tprivate static void solver(int arr[],int k)\n\t{\n\t\tint min = 0;\n\t\tArrays.sort(arr);\n\t\tfor(int i=0;i<k;i++) min = min+arr[i];\n\t\tSystem.out.println(min); \n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint k = s.nextInt();\n\t\tint fruits[] = new int[n];\n\t\tfor(int i=0;i<n;i++) fruits[i] = s.nextInt();\n\t\tsolver(fruits,k);\n\t}\n\tprivate static void solver(int arr[],int k)\n\t{\n\t\tint min = 0;\n\t\tArrays.sort(arr);\n\t\tfor(int i=0;i<k;i++) min = min+arr[i];\n\t\tSystem.out.println(min); \n\t}\n}",
"Main",
"public static void main(String args[])\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint k = s.nextInt();\n\t\tint fruits[] = new int[n];\n\t\tfor(int i=0;i<n;i++) fruits[i] = s.nextInt();\n\t\tsolver(fruits,k);\n\t}",
"main",
"{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint k = s.nextInt();\n\t\tint fruits[] = new int[n];\n\t\tfor(int i=0;i<n;i++) fruits[i] = s.nextInt();\n\t\tsolver(fruits,k);\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int k = s.nextInt();",
"k",
"s.nextInt()",
"s.nextInt",
"s",
"int fruits[] = new int[n];",
"fruits",
"new int[n]",
"n",
"for(int i=0;i<n;i++) fruits[i] = s.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"fruits[i] = s.nextInt();",
"fruits[i] = s.nextInt()",
"fruits[i]",
"fruits",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"solver(fruits,k)",
"solver",
"fruits",
"k",
"String args[]",
"args",
"private static void solver(int arr[],int k)\n\t{\n\t\tint min = 0;\n\t\tArrays.sort(arr);\n\t\tfor(int i=0;i<k;i++) min = min+arr[i];\n\t\tSystem.out.println(min); \n\t}",
"solver",
"{\n\t\tint min = 0;\n\t\tArrays.sort(arr);\n\t\tfor(int i=0;i<k;i++) min = min+arr[i];\n\t\tSystem.out.println(min); \n\t}",
"int min = 0;",
"min",
"0",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"for(int i=0;i<k;i++) min = min+arr[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"min = min+arr[i];",
"min = min+arr[i]",
"min",
"min+arr[i]",
"min",
"arr[i]",
"arr",
"i",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"int arr[]",
"arr",
"int k",
"k",
"public class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint k = s.nextInt();\n\t\tint fruits[] = new int[n];\n\t\tfor(int i=0;i<n;i++) fruits[i] = s.nextInt();\n\t\tsolver(fruits,k);\n\t}\n\tprivate static void solver(int arr[],int k)\n\t{\n\t\tint min = 0;\n\t\tArrays.sort(arr);\n\t\tfor(int i=0;i<k;i++) min = min+arr[i];\n\t\tSystem.out.println(min); \n\t}\n}",
"public class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tint k = s.nextInt();\n\t\tint fruits[] = new int[n];\n\t\tfor(int i=0;i<n;i++) fruits[i] = s.nextInt();\n\t\tsolver(fruits,k);\n\t}\n\tprivate static void solver(int arr[],int k)\n\t{\n\t\tint min = 0;\n\t\tArrays.sort(arr);\n\t\tfor(int i=0;i<k;i++) min = min+arr[i];\n\t\tSystem.out.println(min); \n\t}\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
public class Main
{
public static void main(String args[])
{
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int k = s.nextInt();
int fruits[] = new int[n];
for(int i=0;i<n;i++) fruits[i] = s.nextInt();
solver(fruits,k);
}
private static void solver(int arr[],int k)
{
int min = 0;
Arrays.sort(arr);
for(int i=0;i<k;i++) min = min+arr[i];
System.out.println(min);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
13,
13,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
8,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
87,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
8,
105
],
[
105,
106
],
[
105,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
8,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint many = scan.nextInt();\n\t\tint kind = scan.nextInt();\n\t\tint yen;\n\t\tint[] yenbox = new int[many];\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}\n\t\tint min;\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint answer = 0;\n\t\tfor(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}\n\t\tSystem.out.print(answer);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint many = scan.nextInt();\n\t\tint kind = scan.nextInt();\n\t\tint yen;\n\t\tint[] yenbox = new int[many];\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}\n\t\tint min;\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint answer = 0;\n\t\tfor(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}\n\t\tSystem.out.print(answer);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint many = scan.nextInt();\n\t\tint kind = scan.nextInt();\n\t\tint yen;\n\t\tint[] yenbox = new int[many];\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}\n\t\tint min;\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint answer = 0;\n\t\tfor(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}\n\t\tSystem.out.print(answer);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint many = scan.nextInt();\n\t\tint kind = scan.nextInt();\n\t\tint yen;\n\t\tint[] yenbox = new int[many];\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}\n\t\tint min;\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint answer = 0;\n\t\tfor(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}\n\t\tSystem.out.print(answer);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int many = scan.nextInt();",
"many",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int kind = scan.nextInt();",
"kind",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int yen;",
"yen",
"int[] yenbox = new int[many];",
"yenbox",
"new int[many]",
"many",
"for(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<many",
"i",
"many",
"i++",
"i++",
"i",
"{\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}",
"{\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}",
"yen = scan.nextInt()",
"yen",
"scan.nextInt()",
"scan.nextInt",
"scan",
"yenbox[i] = yen",
"yenbox[i]",
"yenbox",
"i",
"yen",
"int min;",
"min",
"for(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<many",
"i",
"many",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}",
"int j=i;",
"int j=i;",
"j",
"i",
"j<many",
"j",
"many",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}",
"if(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}",
"yenbox[i]>yenbox[j]",
"yenbox[i]",
"yenbox",
"i",
"yenbox[j]",
"yenbox",
"j",
"{\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}",
"min = yenbox[i]",
"min",
"yenbox[i]",
"yenbox",
"i",
"yenbox[i] = yenbox[j]",
"yenbox[i]",
"yenbox",
"i",
"yenbox[j]",
"yenbox",
"j",
"yenbox[j] = min",
"yenbox[j]",
"yenbox",
"j",
"min",
"int answer = 0;",
"answer",
"0",
"for(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<kind",
"i",
"kind",
"i++",
"i++",
"i",
"{\n\t\t\tanswer += yenbox[i];\n\t\t}",
"{\n\t\t\tanswer += yenbox[i];\n\t\t}",
"answer += yenbox[i]",
"answer",
"yenbox[i]",
"yenbox",
"i",
"System.out.print(answer)",
"System.out.print",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint many = scan.nextInt();\n\t\tint kind = scan.nextInt();\n\t\tint yen;\n\t\tint[] yenbox = new int[many];\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}\n\t\tint min;\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint answer = 0;\n\t\tfor(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}\n\t\tSystem.out.print(answer);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint many = scan.nextInt();\n\t\tint kind = scan.nextInt();\n\t\tint yen;\n\t\tint[] yenbox = new int[many];\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tyen = scan.nextInt();\n\t\t\tyenbox[i] = yen;\n\t\t}\n\t\tint min;\n\t\tfor(int i=0;i<many;i++) {\n\t\t\tfor(int j=i;j<many;j++) {\n\t\t\t\tif(yenbox[i]>yenbox[j]) {\n\t\t\t\t\tmin = yenbox[i];\n\t\t\t\t\tyenbox[i] = yenbox[j];\n\t\t\t\t\tyenbox[j] = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint answer = 0;\n\t\tfor(int i=0;i<kind;i++) {\n\t\t\tanswer += yenbox[i];\n\t\t}\n\t\tSystem.out.print(answer);\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int many = scan.nextInt();
int kind = scan.nextInt();
int yen;
int[] yenbox = new int[many];
for(int i=0;i<many;i++) {
yen = scan.nextInt();
yenbox[i] = yen;
}
int min;
for(int i=0;i<many;i++) {
for(int j=i;j<many;j++) {
if(yenbox[i]>yenbox[j]) {
min = yenbox[i];
yenbox[i] = yenbox[j];
yenbox[j] = min;
}
}
}
int answer = 0;
for(int i=0;i<kind;i++) {
answer += yenbox[i];
}
System.out.print(answer);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
179,
17
],
[
179,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
20,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
20,
61
],
[
61,
62
],
[
61,
63
],
[
20,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
20,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
18,
87
],
[
87,
88
],
[
179,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
89,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
89,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
105,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
115,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
104,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
89,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
89,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
146,
147
],
[
89,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
155,
156
],
[
89,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
163,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
159,
176
],
[
176,
177
],
[
0,
178
],
[
178,
179
],
[
178,
180
]
]
| [
"import java.util.Arrays;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n int k = fs.nextInt();\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n a[i] = fs.nextInt();\n \n Arrays.sort(a);\n long sum = 0;\n for(int i=0; i<k; i++)\n sum += a[i];\n System.out.print(sum);\n }\n\n static class FastScanner {\n BufferedReader br = null;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n int k = fs.nextInt();\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n a[i] = fs.nextInt();\n \n Arrays.sort(a);\n long sum = 0;\n for(int i=0; i<k; i++)\n sum += a[i];\n System.out.print(sum);\n }\n\n static class FastScanner {\n BufferedReader br = null;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n int k = fs.nextInt();\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n a[i] = fs.nextInt();\n \n Arrays.sort(a);\n long sum = 0;\n for(int i=0; i<k; i++)\n sum += a[i];\n System.out.print(sum);\n }",
"main",
"{\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n int k = fs.nextInt();\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n a[i] = fs.nextInt();\n \n Arrays.sort(a);\n long sum = 0;\n for(int i=0; i<k; i++)\n sum += a[i];\n System.out.print(sum);\n }",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"int n = fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int k = fs.nextInt();",
"k",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n; i++)\n a[i] = fs.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = fs.nextInt();",
"a[i] = fs.nextInt()",
"a[i]",
"a",
"i",
"fs.nextInt()",
"fs.nextInt",
"fs",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"long sum = 0;",
"sum",
"0",
"for(int i=0; i<k; i++)\n sum += a[i];",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"sum += a[i];",
"sum += a[i]",
"sum",
"a[i]",
"a",
"i",
"System.out.print(sum)",
"System.out.print",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"static class FastScanner {\n BufferedReader br = null;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastScanner",
"BufferedReader br = null;",
"br",
"null",
"StringTokenizer st;",
"st",
"public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastScanner",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n int k = fs.nextInt();\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n a[i] = fs.nextInt();\n \n Arrays.sort(a);\n long sum = 0;\n for(int i=0; i<k; i++)\n sum += a[i];\n System.out.print(sum);\n }\n\n static class FastScanner {\n BufferedReader br = null;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n int k = fs.nextInt();\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n a[i] = fs.nextInt();\n \n Arrays.sort(a);\n long sum = 0;\n for(int i=0; i<k; i++)\n sum += a[i];\n System.out.print(sum);\n }\n\n static class FastScanner {\n BufferedReader br = null;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while(st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main"
]
| import java.util.Arrays;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int n = fs.nextInt();
int k = fs.nextInt();
int[] a = new int[n];
for(int i=0; i<n; i++)
a[i] = fs.nextInt();
Arrays.sort(a);
long sum = 0;
for(int i=0; i<k; i++)
sum += a[i];
System.out.print(sum);
}
static class FastScanner {
BufferedReader br = null;
StringTokenizer st;
public FastScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while(st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
41,
13,
2,
13,
17,
0,
13,
4,
18,
13,
13,
40,
13,
0,
13,
17,
4,
18,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
30,
29,
18,
13,
40,
13,
30,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
30,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
30,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
30,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
30,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
12,
13,
30,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
20,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
17,
13,
0,
18,
13,
2,
2,
18,
13,
13,
17,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
17,
13,
0,
18,
13,
2,
2,
18,
13,
13,
17,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
17,
13,
0,
18,
13,
2,
2,
18,
13,
13,
17,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
17,
13,
0,
18,
13,
2,
2,
18,
13,
13,
17,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
17,
13,
0,
18,
13,
2,
2,
18,
13,
13,
17,
13,
13,
29,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
29,
18,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
29,
18,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
29,
18,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
29,
18,
13,
2,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
29,
18,
13,
2,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
29,
18,
13,
2,
18,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
0,
13,
17,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
928,
17
],
[
928,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
20,
34
],
[
34,
35
],
[
35,
36
],
[
18,
37
],
[
37,
38
],
[
0,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
39,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
55,
80
],
[
80,
81
],
[
80,
82
],
[
55,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
87,
99
],
[
99,
100
],
[
87,
101
],
[
101,
102
],
[
101,
103
],
[
55,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
53,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
113,
120
],
[
120,
121
],
[
120,
122
],
[
113,
124
],
[
124,
125
],
[
124,
126
],
[
113,
127
],
[
127,
128
],
[
127,
129
],
[
113,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
138,
139
],
[
133,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
144,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
140,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
162,
163
],
[
163,
164
],
[
132,
165
],
[
165,
166
],
[
113,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
170,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
113,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
191,
193
],
[
183,
194
],
[
194,
195
],
[
113,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
206,
208
],
[
199,
209
],
[
209,
210
],
[
210,
211
],
[
198,
212
],
[
212,
213
],
[
213,
214
],
[
113,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
218,
222
],
[
222,
223
],
[
223,
224
],
[
217,
225
],
[
225,
226
],
[
225,
227
],
[
217,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
217,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
237,
240
],
[
236,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
217,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
113,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
252,
256
],
[
256,
257
],
[
257,
258
],
[
251,
259
],
[
259,
260
],
[
259,
261
],
[
251,
262
],
[
262,
263
],
[
262,
264
],
[
251,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
251,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
269,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
251,
281
],
[
281,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
286,
287
],
[
286,
288
],
[
281,
289
],
[
289,
290
],
[
290,
291
],
[
251,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
295,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
296,
300
],
[
300,
301
],
[
300,
302
],
[
295,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
309,
311
],
[
295,
312
],
[
312,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
316,
317
],
[
313,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
312,
322
],
[
322,
323
],
[
323,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
324,
328
],
[
312,
329
],
[
329,
330
],
[
330,
331
],
[
294,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
113,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
338,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
347,
349
],
[
344,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
352,
354
],
[
343,
355
],
[
355,
356
],
[
356,
357
],
[
338,
358
],
[
358,
359
],
[
113,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
365,
366
],
[
364,
367
],
[
367,
368
],
[
113,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
371,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
378,
380
],
[
376,
381
],
[
381,
382
],
[
381,
383
],
[
376,
384
],
[
384,
385
],
[
385,
386
],
[
376,
387
],
[
388,
388
],
[
388,
389
],
[
389,
390
],
[
390,
391
],
[
390,
392
],
[
389,
393
],
[
393,
394
],
[
371,
395
],
[
395,
396
],
[
369,
397
],
[
397,
398
],
[
113,
399
],
[
399,
400
],
[
399,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
401,
406
],
[
406,
407
],
[
407,
408
],
[
408,
409
],
[
408,
410
],
[
406,
411
],
[
411,
412
],
[
411,
413
],
[
406,
414
],
[
414,
415
],
[
415,
416
],
[
406,
417
],
[
418,
418
],
[
418,
419
],
[
419,
420
],
[
420,
421
],
[
420,
422
],
[
419,
423
],
[
423,
424
],
[
401,
425
],
[
425,
426
],
[
399,
427
],
[
427,
428
],
[
113,
429
],
[
429,
430
],
[
429,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
431,
436
],
[
436,
437
],
[
437,
438
],
[
438,
439
],
[
438,
440
],
[
436,
441
],
[
441,
442
],
[
441,
443
],
[
436,
444
],
[
444,
445
],
[
445,
446
],
[
436,
447
],
[
448,
448
],
[
448,
449
],
[
449,
450
],
[
450,
451
],
[
450,
452
],
[
449,
453
],
[
453,
454
],
[
431,
455
],
[
455,
456
],
[
429,
457
],
[
457,
458
],
[
113,
459
],
[
459,
460
],
[
459,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
461,
466
],
[
466,
467
],
[
467,
468
],
[
468,
469
],
[
468,
470
],
[
466,
471
],
[
471,
472
],
[
471,
473
],
[
466,
474
],
[
474,
475
],
[
475,
476
],
[
466,
477
],
[
478,
478
],
[
478,
479
],
[
479,
480
],
[
480,
481
],
[
480,
482
],
[
479,
483
],
[
483,
484
],
[
461,
485
],
[
485,
486
],
[
459,
487
],
[
487,
488
],
[
0,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
491,
493
],
[
493,
494
],
[
494,
495
],
[
495,
496
],
[
496,
497
],
[
496,
498
],
[
494,
499
],
[
499,
500
],
[
499,
501
],
[
499,
502
],
[
491,
503
],
[
503,
504
],
[
489,
505
],
[
505,
506
],
[
505,
507
],
[
507,
508
],
[
508,
509
],
[
509,
510
],
[
510,
511
],
[
510,
512
],
[
508,
513
],
[
513,
514
],
[
513,
515
],
[
513,
516
],
[
505,
517
],
[
517,
518
],
[
489,
519
],
[
519,
520
],
[
519,
521
],
[
521,
522
],
[
522,
523
],
[
522,
524
],
[
524,
525
],
[
525,
526
],
[
521,
527
],
[
527,
528
],
[
528,
529
],
[
527,
530
],
[
521,
531
],
[
531,
532
],
[
532,
533
],
[
533,
534
],
[
532,
535
],
[
519,
536
],
[
536,
537
],
[
489,
538
],
[
538,
539
],
[
538,
540
],
[
540,
541
],
[
541,
542
],
[
542,
543
],
[
543,
544
],
[
544,
545
],
[
545,
546
],
[
538,
547
],
[
547,
548
],
[
489,
549
],
[
549,
550
],
[
549,
551
],
[
551,
552
],
[
552,
553
],
[
553,
554
],
[
554,
555
],
[
554,
556
],
[
552,
557
],
[
557,
558
],
[
557,
559
],
[
559,
560
],
[
560,
561
],
[
560,
562
],
[
559,
563
],
[
552,
564
],
[
564,
565
],
[
565,
566
],
[
552,
567
],
[
568,
568
],
[
568,
569
],
[
569,
570
],
[
569,
571
],
[
571,
572
],
[
571,
573
],
[
568,
574
],
[
574,
575
],
[
575,
576
],
[
575,
577
],
[
574,
578
],
[
578,
579
],
[
578,
580
],
[
581,
581
],
[
581,
582
],
[
582,
583
],
[
582,
584
],
[
581,
585
],
[
581,
586
],
[
568,
587
],
[
587,
588
],
[
588,
589
],
[
588,
590
],
[
591,
591
],
[
591,
592
],
[
592,
593
],
[
592,
594
],
[
591,
595
],
[
591,
596
],
[
587,
597
],
[
551,
598
],
[
598,
599
],
[
549,
600
],
[
600,
601
],
[
489,
602
],
[
602,
603
],
[
602,
604
],
[
604,
605
],
[
605,
606
],
[
606,
607
],
[
607,
608
],
[
607,
609
],
[
605,
610
],
[
610,
611
],
[
610,
612
],
[
612,
613
],
[
613,
614
],
[
613,
615
],
[
612,
616
],
[
605,
617
],
[
617,
618
],
[
618,
619
],
[
605,
620
],
[
621,
621
],
[
621,
622
],
[
622,
623
],
[
622,
624
],
[
624,
625
],
[
624,
626
],
[
621,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
627,
631
],
[
631,
632
],
[
631,
633
],
[
634,
634
],
[
634,
635
],
[
635,
636
],
[
635,
637
],
[
634,
638
],
[
634,
639
],
[
621,
640
],
[
640,
641
],
[
641,
642
],
[
641,
643
],
[
644,
644
],
[
644,
645
],
[
645,
646
],
[
645,
647
],
[
644,
648
],
[
644,
649
],
[
640,
650
],
[
604,
651
],
[
651,
652
],
[
602,
653
],
[
653,
654
],
[
489,
655
],
[
655,
656
],
[
655,
657
],
[
657,
658
],
[
658,
659
],
[
659,
660
],
[
660,
661
],
[
660,
662
],
[
658,
663
],
[
663,
664
],
[
663,
665
],
[
665,
666
],
[
666,
667
],
[
666,
668
],
[
665,
669
],
[
658,
670
],
[
670,
671
],
[
671,
672
],
[
658,
673
],
[
674,
674
],
[
674,
675
],
[
675,
676
],
[
675,
677
],
[
677,
678
],
[
677,
679
],
[
674,
680
],
[
680,
681
],
[
681,
682
],
[
681,
683
],
[
680,
684
],
[
684,
685
],
[
684,
686
],
[
687,
687
],
[
687,
688
],
[
688,
689
],
[
688,
690
],
[
687,
691
],
[
687,
692
],
[
674,
693
],
[
693,
694
],
[
694,
695
],
[
694,
696
],
[
697,
697
],
[
697,
698
],
[
698,
699
],
[
698,
700
],
[
697,
701
],
[
697,
702
],
[
693,
703
],
[
657,
704
],
[
704,
705
],
[
655,
706
],
[
706,
707
],
[
489,
708
],
[
708,
709
],
[
708,
710
],
[
710,
711
],
[
711,
712
],
[
712,
713
],
[
713,
714
],
[
713,
715
],
[
711,
716
],
[
716,
717
],
[
716,
718
],
[
718,
719
],
[
719,
720
],
[
719,
721
],
[
718,
722
],
[
711,
723
],
[
723,
724
],
[
724,
725
],
[
711,
726
],
[
727,
727
],
[
727,
728
],
[
728,
729
],
[
728,
730
],
[
730,
731
],
[
730,
732
],
[
727,
733
],
[
733,
734
],
[
734,
735
],
[
734,
736
],
[
733,
737
],
[
737,
738
],
[
737,
739
],
[
740,
740
],
[
740,
741
],
[
741,
742
],
[
741,
743
],
[
740,
744
],
[
740,
745
],
[
727,
746
],
[
746,
747
],
[
747,
748
],
[
747,
749
],
[
750,
750
],
[
750,
751
],
[
751,
752
],
[
751,
753
],
[
750,
754
],
[
750,
755
],
[
746,
756
],
[
710,
757
],
[
757,
758
],
[
708,
759
],
[
759,
760
],
[
489,
761
],
[
761,
762
],
[
761,
763
],
[
763,
764
],
[
764,
765
],
[
765,
766
],
[
766,
767
],
[
766,
768
],
[
764,
769
],
[
769,
770
],
[
769,
771
],
[
771,
772
],
[
772,
773
],
[
772,
774
],
[
771,
775
],
[
764,
776
],
[
776,
777
],
[
777,
778
],
[
764,
779
],
[
780,
780
],
[
780,
781
],
[
781,
782
],
[
781,
783
],
[
783,
784
],
[
783,
785
],
[
780,
786
],
[
786,
787
],
[
787,
788
],
[
787,
789
],
[
786,
790
],
[
790,
791
],
[
790,
792
],
[
793,
793
],
[
793,
794
],
[
794,
795
],
[
794,
796
],
[
793,
797
],
[
793,
798
],
[
780,
799
],
[
799,
800
],
[
800,
801
],
[
800,
802
],
[
803,
803
],
[
803,
804
],
[
804,
805
],
[
804,
806
],
[
803,
807
],
[
803,
808
],
[
799,
809
],
[
763,
810
],
[
810,
811
],
[
761,
812
],
[
812,
813
],
[
489,
814
],
[
814,
815
],
[
814,
816
],
[
816,
817
],
[
817,
818
],
[
818,
819
],
[
817,
820
],
[
816,
821
],
[
821,
822
],
[
822,
823
],
[
822,
824
],
[
814,
825
],
[
825,
826
],
[
489,
827
],
[
827,
828
],
[
827,
829
],
[
829,
830
],
[
830,
831
],
[
831,
832
],
[
830,
833
],
[
829,
834
],
[
834,
835
],
[
835,
836
],
[
835,
837
],
[
827,
838
],
[
838,
839
],
[
489,
840
],
[
840,
841
],
[
840,
842
],
[
842,
843
],
[
843,
844
],
[
844,
845
],
[
843,
846
],
[
842,
847
],
[
847,
848
],
[
848,
849
],
[
848,
850
],
[
840,
851
],
[
851,
852
],
[
489,
853
],
[
853,
854
],
[
853,
855
],
[
855,
856
],
[
856,
857
],
[
857,
858
],
[
856,
859
],
[
855,
860
],
[
860,
861
],
[
861,
862
],
[
861,
863
],
[
863,
864
],
[
864,
865
],
[
864,
866
],
[
863,
867
],
[
853,
868
],
[
868,
869
],
[
489,
870
],
[
870,
871
],
[
870,
872
],
[
872,
873
],
[
873,
874
],
[
874,
875
],
[
873,
876
],
[
872,
877
],
[
877,
878
],
[
878,
879
],
[
878,
880
],
[
880,
881
],
[
881,
882
],
[
881,
883
],
[
880,
884
],
[
870,
885
],
[
885,
886
],
[
489,
887
],
[
887,
888
],
[
887,
889
],
[
889,
890
],
[
890,
891
],
[
891,
892
],
[
890,
893
],
[
889,
894
],
[
894,
895
],
[
895,
896
],
[
895,
897
],
[
897,
898
],
[
898,
899
],
[
898,
900
],
[
897,
901
],
[
887,
902
],
[
902,
903
],
[
489,
904
],
[
904,
905
],
[
904,
906
],
[
906,
907
],
[
907,
908
],
[
907,
909
],
[
906,
910
],
[
910,
911
],
[
911,
912
],
[
911,
913
],
[
910,
914
],
[
914,
915
],
[
915,
916
],
[
915,
917
],
[
917,
918
],
[
917,
919
],
[
914,
920
],
[
920,
921
],
[
920,
922
],
[
906,
923
],
[
923,
924
],
[
904,
925
],
[
925,
926
],
[
0,
927
],
[
927,
928
],
[
927,
929
]
]
| [
"\nimport java.text.DecimalFormat;\nimport java.util.stream.LongStream;\nimport java.util.stream.IntStream;\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}\n\nclass AtCoder {\n\n long N;\n\n AtCoder(FastScanner sc) {\n N = sc.nextLong();\n }\n\n void solve(PrintWriter out) {\n List<Character> ls = new ArrayList<>();\n ls.add('z');\n for (char c = 'a'; c <= 'z'; c++) {\n ls.add(c);\n }\n String ans = \"\";\n while (N > 0) {\n int rem = (int) (N % 26);\n ans += ls.get(rem);\n N--;\n N /= 26;\n }\n out.println(My.reverse(ans));\n }\n\n}\n\nclass FastScanner {\n\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }\n\n public String next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] arrayInt(int N) {\n int[] array = new int[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long[] arrayLong(int N) {\n long[] array = new long[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextLong();\n }\n return array;\n }\n\n public double[] arrayDouble(int N) {\n double[] array = new double[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextDouble();\n }\n return array;\n }\n\n public String[] arrayString(int N) {\n String[] array = new String[N];\n for (int i = 0; i < N; i++) {\n array[i] = next();\n }\n return array;\n }\n}\n\nclass My {\n\n static void ans(boolean b) {\n System.out.println(b ? \"Yes\" : \"No\");\n }\n\n static void ANS(boolean b) {\n System.out.println(b ? \"YES\" : \"NO\");\n }\n\n static String sort(String s) {\n char[] ch = s.toCharArray();\n Arrays.sort(ch);\n return String.valueOf(ch);\n }\n\n static String reverse(String s) {\n return new StringBuilder(s).reverse().toString();\n }\n\n static int[] reverse(int[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static long[] reverse(long[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static double[] reverse(double[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static String[] reverse(String[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static char[] reverse(char[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static long min(long... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }\n\n static int min(int... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }\n\n static double min(double... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }\n\n static long max(long... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }\n\n static int max(int... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }\n\n static double max(double... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }\n\n static int sum(long number) {\n int sum = 0;\n while (number > 0) {\n sum += number % 10;\n number /= 10;\n }\n return sum;\n }\n\n}",
"import java.text.DecimalFormat;",
"DecimalFormat",
"java.text",
"import java.util.stream.LongStream;",
"LongStream",
"java.util.stream",
"import java.util.stream.IntStream;",
"IntStream",
"java.util.stream",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}",
"Main",
"public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }",
"main",
"{\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"AtCoder problem = new AtCoder(sc);",
"problem",
"new AtCoder(sc)",
"problem.solve(out)",
"problem.solve",
"problem",
"out",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"class AtCoder {\n\n long N;\n\n AtCoder(FastScanner sc) {\n N = sc.nextLong();\n }\n\n void solve(PrintWriter out) {\n List<Character> ls = new ArrayList<>();\n ls.add('z');\n for (char c = 'a'; c <= 'z'; c++) {\n ls.add(c);\n }\n String ans = \"\";\n while (N > 0) {\n int rem = (int) (N % 26);\n ans += ls.get(rem);\n N--;\n N /= 26;\n }\n out.println(My.reverse(ans));\n }\n\n}",
"AtCoder",
"long N;",
"N",
"AtCoder(FastScanner sc) {\n N = sc.nextLong();\n }",
"AtCoder",
"{\n N = sc.nextLong();\n }",
"N = sc.nextLong()",
"N",
"sc.nextLong()",
"sc.nextLong",
"sc",
"FastScanner sc",
"sc",
"void solve(PrintWriter out) {\n List<Character> ls = new ArrayList<>();\n ls.add('z');\n for (char c = 'a'; c <= 'z'; c++) {\n ls.add(c);\n }\n String ans = \"\";\n while (N > 0) {\n int rem = (int) (N % 26);\n ans += ls.get(rem);\n N--;\n N /= 26;\n }\n out.println(My.reverse(ans));\n }",
"solve",
"{\n List<Character> ls = new ArrayList<>();\n ls.add('z');\n for (char c = 'a'; c <= 'z'; c++) {\n ls.add(c);\n }\n String ans = \"\";\n while (N > 0) {\n int rem = (int) (N % 26);\n ans += ls.get(rem);\n N--;\n N /= 26;\n }\n out.println(My.reverse(ans));\n }",
"List<Character> ls = new ArrayList<>();",
"ls",
"new ArrayList<>()",
"ls.add('z')",
"ls.add",
"ls",
"'z'",
"for (char c = 'a'; c <= 'z'; c++) {\n ls.add(c);\n }",
"char c = 'a';",
"char c = 'a';",
"c",
"'a'",
"c <= 'z'",
"c",
"'z'",
"c++",
"c++",
"c",
"{\n ls.add(c);\n }",
"{\n ls.add(c);\n }",
"ls.add(c)",
"ls.add",
"ls",
"c",
"String ans = \"\";",
"ans",
"\"\"",
"while (N > 0) {\n int rem = (int) (N % 26);\n ans += ls.get(rem);\n N--;\n N /= 26;\n }",
"N > 0",
"N",
"0",
"{\n int rem = (int) (N % 26);\n ans += ls.get(rem);\n N--;\n N /= 26;\n }",
"int rem = (int) (N % 26);",
"rem",
"(int) (N % 26)",
"N",
"26",
"ans += ls.get(rem)",
"ans",
"ls.get(rem)",
"ls.get",
"ls",
"rem",
"N--",
"N",
"N /= 26",
"N",
"26",
"out.println(My.reverse(ans))",
"out.println",
"out",
"My.reverse(ans)",
"My.reverse",
"My",
"ans",
"PrintWriter out",
"out",
"class FastScanner {\n\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }\n\n public String next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] arrayInt(int N) {\n int[] array = new int[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long[] arrayLong(int N) {\n long[] array = new long[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextLong();\n }\n return array;\n }\n\n public double[] arrayDouble(int N) {\n double[] array = new double[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextDouble();\n }\n return array;\n }\n\n public String[] arrayString(int N) {\n String[] array = new String[N];\n for (int i = 0; i < N; i++) {\n array[i] = next();\n }\n return array;\n }\n}",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"hasNextByte",
"{\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr < buflen",
"ptr",
"buflen",
"{\n return true;\n }",
"return true;",
"true",
"{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr = 0",
"ptr",
"0",
"try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n buflen = in.read(buffer);\n }",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n return false;\n }",
"buflen <= 0",
"buflen",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }",
"readByte",
"{\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }",
"if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }",
"hasNextByte()",
"hasNextByte",
"{\n return buffer[ptr++];\n }",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }",
"isPrintableChar",
"{\n return 33 <= c && c <= 126;\n }",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }",
"hasNext",
"{\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }",
"while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"{\n ptr++;\n }",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"next",
"{\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"if (!hasNext()) {\n throw new NoSuchElementException();\n }",
"!hasNext()",
"hasNext()",
"hasNext",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"nextLong",
"{\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"if (!hasNext()) {\n throw new NoSuchElementException();\n }",
"!hasNext()",
"hasNext()",
"hasNext",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"true",
"{\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n n *= 10;\n n += b - '0';\n }",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n return minus ? -n : n;\n }",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }",
"nextInt",
"{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public int[] arrayInt(int N) {\n int[] array = new int[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextInt();\n }\n return array;\n }",
"arrayInt",
"{\n int[] array = new int[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextInt();\n }\n return array;\n }",
"int[] array = new int[N];",
"array",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n array[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n array[i] = nextInt();\n }",
"{\n array[i] = nextInt();\n }",
"array[i] = nextInt()",
"array[i]",
"array",
"i",
"nextInt()",
"nextInt",
"return array;",
"array",
"int N",
"N",
"public long[] arrayLong(int N) {\n long[] array = new long[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextLong();\n }\n return array;\n }",
"arrayLong",
"{\n long[] array = new long[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextLong();\n }\n return array;\n }",
"long[] array = new long[N];",
"array",
"new long[N]",
"N",
"for (int i = 0; i < N; i++) {\n array[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n array[i] = nextLong();\n }",
"{\n array[i] = nextLong();\n }",
"array[i] = nextLong()",
"array[i]",
"array",
"i",
"nextLong()",
"nextLong",
"return array;",
"array",
"int N",
"N",
"public double[] arrayDouble(int N) {\n double[] array = new double[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextDouble();\n }\n return array;\n }",
"arrayDouble",
"{\n double[] array = new double[N];\n for (int i = 0; i < N; i++) {\n array[i] = nextDouble();\n }\n return array;\n }",
"double[] array = new double[N];",
"array",
"new double[N]",
"N",
"for (int i = 0; i < N; i++) {\n array[i] = nextDouble();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n array[i] = nextDouble();\n }",
"{\n array[i] = nextDouble();\n }",
"array[i] = nextDouble()",
"array[i]",
"array",
"i",
"nextDouble()",
"nextDouble",
"return array;",
"array",
"int N",
"N",
"public String[] arrayString(int N) {\n String[] array = new String[N];\n for (int i = 0; i < N; i++) {\n array[i] = next();\n }\n return array;\n }",
"arrayString",
"{\n String[] array = new String[N];\n for (int i = 0; i < N; i++) {\n array[i] = next();\n }\n return array;\n }",
"String[] array = new String[N];",
"array",
"new String[N]",
"N",
"for (int i = 0; i < N; i++) {\n array[i] = next();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n array[i] = next();\n }",
"{\n array[i] = next();\n }",
"array[i] = next()",
"array[i]",
"array",
"i",
"next()",
"next",
"return array;",
"array",
"int N",
"N",
"class My {\n\n static void ans(boolean b) {\n System.out.println(b ? \"Yes\" : \"No\");\n }\n\n static void ANS(boolean b) {\n System.out.println(b ? \"YES\" : \"NO\");\n }\n\n static String sort(String s) {\n char[] ch = s.toCharArray();\n Arrays.sort(ch);\n return String.valueOf(ch);\n }\n\n static String reverse(String s) {\n return new StringBuilder(s).reverse().toString();\n }\n\n static int[] reverse(int[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static long[] reverse(long[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static double[] reverse(double[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static String[] reverse(String[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static char[] reverse(char[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }\n\n static long min(long... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }\n\n static int min(int... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }\n\n static double min(double... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }\n\n static long max(long... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }\n\n static int max(int... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }\n\n static double max(double... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }\n\n static int sum(long number) {\n int sum = 0;\n while (number > 0) {\n sum += number % 10;\n number /= 10;\n }\n return sum;\n }\n\n}",
"My",
"static void ans(boolean b) {\n System.out.println(b ? \"Yes\" : \"No\");\n }",
"ans",
"{\n System.out.println(b ? \"Yes\" : \"No\");\n }",
"System.out.println(b ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"b ? \"Yes\" : \"No\"",
"b",
"\"Yes\"",
"\"No\"",
"boolean b",
"b",
"static void ANS(boolean b) {\n System.out.println(b ? \"YES\" : \"NO\");\n }",
"ANS",
"{\n System.out.println(b ? \"YES\" : \"NO\");\n }",
"System.out.println(b ? \"YES\" : \"NO\")",
"System.out.println",
"System.out",
"System",
"System.out",
"b ? \"YES\" : \"NO\"",
"b",
"\"YES\"",
"\"NO\"",
"boolean b",
"b",
"static String sort(String s) {\n char[] ch = s.toCharArray();\n Arrays.sort(ch);\n return String.valueOf(ch);\n }",
"sort",
"{\n char[] ch = s.toCharArray();\n Arrays.sort(ch);\n return String.valueOf(ch);\n }",
"char[] ch = s.toCharArray();",
"ch",
"s.toCharArray()",
"s.toCharArray",
"s",
"Arrays.sort(ch)",
"Arrays.sort",
"Arrays",
"ch",
"return String.valueOf(ch);",
"String.valueOf(ch)",
"String.valueOf",
"String",
"ch",
"String s",
"s",
"static String reverse(String s) {\n return new StringBuilder(s).reverse().toString();\n }",
"reverse",
"{\n return new StringBuilder(s).reverse().toString();\n }",
"return new StringBuilder(s).reverse().toString();",
"new StringBuilder(s).reverse().toString()",
"new StringBuilder(s).reverse().toString",
"new StringBuilder(s).reverse()",
"new StringBuilder(s).reverse",
"new StringBuilder(s)",
"String s",
"s",
"static int[] reverse(int[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"reverse",
"{\n for (int i = 0; i < array.length / 2; i++) {\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"for (int i = 0; i < array.length / 2; i++) {\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length / 2",
"i",
"array.length / 2",
"array.length",
"array",
"array.length",
"2",
"i++",
"i++",
"i",
"{\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"{\n int temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"int temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[array.length - 1 - i]",
"array[i]",
"array",
"i",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"array[array.length - 1 - i] = temp",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"temp",
"return array;",
"array",
"int[] array",
"array",
"static long[] reverse(long[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"reverse",
"{\n for (int i = 0; i < array.length / 2; i++) {\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"for (int i = 0; i < array.length / 2; i++) {\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length / 2",
"i",
"array.length / 2",
"array.length",
"array",
"array.length",
"2",
"i++",
"i++",
"i",
"{\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"{\n long temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"long temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[array.length - 1 - i]",
"array[i]",
"array",
"i",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"array[array.length - 1 - i] = temp",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"temp",
"return array;",
"array",
"long[] array",
"array",
"static double[] reverse(double[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"reverse",
"{\n for (int i = 0; i < array.length / 2; i++) {\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"for (int i = 0; i < array.length / 2; i++) {\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length / 2",
"i",
"array.length / 2",
"array.length",
"array",
"array.length",
"2",
"i++",
"i++",
"i",
"{\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"{\n double temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"double temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[array.length - 1 - i]",
"array[i]",
"array",
"i",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"array[array.length - 1 - i] = temp",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"temp",
"return array;",
"array",
"double[] array",
"array",
"static String[] reverse(String[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"reverse",
"{\n for (int i = 0; i < array.length / 2; i++) {\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"for (int i = 0; i < array.length / 2; i++) {\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length / 2",
"i",
"array.length / 2",
"array.length",
"array",
"array.length",
"2",
"i++",
"i++",
"i",
"{\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"{\n String temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"String temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[array.length - 1 - i]",
"array[i]",
"array",
"i",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"array[array.length - 1 - i] = temp",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"temp",
"return array;",
"array",
"String[] array",
"array",
"static char[] reverse(char[] array) {\n for (int i = 0; i < array.length / 2; i++) {\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"reverse",
"{\n for (int i = 0; i < array.length / 2; i++) {\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }\n return array;\n }",
"for (int i = 0; i < array.length / 2; i++) {\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array.length / 2",
"i",
"array.length / 2",
"array.length",
"array",
"array.length",
"2",
"i++",
"i++",
"i",
"{\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"{\n char temp = array[i];\n array[i] = array[array.length - 1 - i];\n array[array.length - 1 - i] = temp;\n }",
"char temp = array[i];",
"temp",
"array[i]",
"array",
"i",
"array[i] = array[array.length - 1 - i]",
"array[i]",
"array",
"i",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"array[array.length - 1 - i] = temp",
"array[array.length - 1 - i]",
"array",
"array.length - 1 - i",
"array.length - 1 - i",
"array.length",
"array",
"array.length",
"1",
"i",
"temp",
"return array;",
"array",
"char[] array",
"array",
"static long min(long... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }",
"min",
"{\n Arrays.sort(numbers);\n return numbers[0];\n }",
"Arrays.sort(numbers)",
"Arrays.sort",
"Arrays",
"numbers",
"return numbers[0];",
"numbers[0]",
"numbers",
"0",
"long... numbers",
"numbers",
"static int min(int... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }",
"min",
"{\n Arrays.sort(numbers);\n return numbers[0];\n }",
"Arrays.sort(numbers)",
"Arrays.sort",
"Arrays",
"numbers",
"return numbers[0];",
"numbers[0]",
"numbers",
"0",
"int... numbers",
"numbers",
"static double min(double... numbers) {\n Arrays.sort(numbers);\n return numbers[0];\n }",
"min",
"{\n Arrays.sort(numbers);\n return numbers[0];\n }",
"Arrays.sort(numbers)",
"Arrays.sort",
"Arrays",
"numbers",
"return numbers[0];",
"numbers[0]",
"numbers",
"0",
"double... numbers",
"numbers",
"static long max(long... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }",
"max",
"{\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }",
"Arrays.sort(numbers)",
"Arrays.sort",
"Arrays",
"numbers",
"return numbers[numbers.length - 1];",
"numbers[numbers.length - 1]",
"numbers",
"numbers.length - 1",
"numbers.length",
"numbers",
"numbers.length",
"1",
"long... numbers",
"numbers",
"static int max(int... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }",
"max",
"{\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }",
"Arrays.sort(numbers)",
"Arrays.sort",
"Arrays",
"numbers",
"return numbers[numbers.length - 1];",
"numbers[numbers.length - 1]",
"numbers",
"numbers.length - 1",
"numbers.length",
"numbers",
"numbers.length",
"1",
"int... numbers",
"numbers",
"static double max(double... numbers) {\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }",
"max",
"{\n Arrays.sort(numbers);\n return numbers[numbers.length - 1];\n }",
"Arrays.sort(numbers)",
"Arrays.sort",
"Arrays",
"numbers",
"return numbers[numbers.length - 1];",
"numbers[numbers.length - 1]",
"numbers",
"numbers.length - 1",
"numbers.length",
"numbers",
"numbers.length",
"1",
"double... numbers",
"numbers",
"static int sum(long number) {\n int sum = 0;\n while (number > 0) {\n sum += number % 10;\n number /= 10;\n }\n return sum;\n }",
"sum",
"{\n int sum = 0;\n while (number > 0) {\n sum += number % 10;\n number /= 10;\n }\n return sum;\n }",
"int sum = 0;",
"sum",
"0",
"while (number > 0) {\n sum += number % 10;\n number /= 10;\n }",
"number > 0",
"number",
"0",
"{\n sum += number % 10;\n number /= 10;\n }",
"sum += number % 10",
"sum",
"number % 10",
"number",
"10",
"number /= 10",
"number",
"10",
"return sum;",
"sum",
"long number",
"number",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}",
"Main"
]
|
import java.text.DecimalFormat;
import java.util.stream.LongStream;
import java.util.stream.IntStream;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
AtCoder problem = new AtCoder(sc);
problem.solve(out);
out.flush();
}
}
class AtCoder {
long N;
AtCoder(FastScanner sc) {
N = sc.nextLong();
}
void solve(PrintWriter out) {
List<Character> ls = new ArrayList<>();
ls.add('z');
for (char c = 'a'; c <= 'z'; c++) {
ls.add(c);
}
String ans = "";
while (N > 0) {
int rem = (int) (N % 26);
ans += ls.get(rem);
N--;
N /= 26;
}
out.println(My.reverse(ans));
}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() {
if (hasNextByte()) {
return buffer[ptr++];
} else {
return -1;
}
}
private static boolean isPrintableChar(int c) {
return 33 <= c && c <= 126;
}
public boolean hasNext() {
while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
ptr++;
}
return hasNextByte();
}
public String next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) {
throw new NoSuchElementException();
}
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while (true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if (b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {
throw new NumberFormatException();
}
return (int) nl;
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] arrayInt(int N) {
int[] array = new int[N];
for (int i = 0; i < N; i++) {
array[i] = nextInt();
}
return array;
}
public long[] arrayLong(int N) {
long[] array = new long[N];
for (int i = 0; i < N; i++) {
array[i] = nextLong();
}
return array;
}
public double[] arrayDouble(int N) {
double[] array = new double[N];
for (int i = 0; i < N; i++) {
array[i] = nextDouble();
}
return array;
}
public String[] arrayString(int N) {
String[] array = new String[N];
for (int i = 0; i < N; i++) {
array[i] = next();
}
return array;
}
}
class My {
static void ans(boolean b) {
System.out.println(b ? "Yes" : "No");
}
static void ANS(boolean b) {
System.out.println(b ? "YES" : "NO");
}
static String sort(String s) {
char[] ch = s.toCharArray();
Arrays.sort(ch);
return String.valueOf(ch);
}
static String reverse(String s) {
return new StringBuilder(s).reverse().toString();
}
static int[] reverse(int[] array) {
for (int i = 0; i < array.length / 2; i++) {
int temp = array[i];
array[i] = array[array.length - 1 - i];
array[array.length - 1 - i] = temp;
}
return array;
}
static long[] reverse(long[] array) {
for (int i = 0; i < array.length / 2; i++) {
long temp = array[i];
array[i] = array[array.length - 1 - i];
array[array.length - 1 - i] = temp;
}
return array;
}
static double[] reverse(double[] array) {
for (int i = 0; i < array.length / 2; i++) {
double temp = array[i];
array[i] = array[array.length - 1 - i];
array[array.length - 1 - i] = temp;
}
return array;
}
static String[] reverse(String[] array) {
for (int i = 0; i < array.length / 2; i++) {
String temp = array[i];
array[i] = array[array.length - 1 - i];
array[array.length - 1 - i] = temp;
}
return array;
}
static char[] reverse(char[] array) {
for (int i = 0; i < array.length / 2; i++) {
char temp = array[i];
array[i] = array[array.length - 1 - i];
array[array.length - 1 - i] = temp;
}
return array;
}
static long min(long... numbers) {
Arrays.sort(numbers);
return numbers[0];
}
static int min(int... numbers) {
Arrays.sort(numbers);
return numbers[0];
}
static double min(double... numbers) {
Arrays.sort(numbers);
return numbers[0];
}
static long max(long... numbers) {
Arrays.sort(numbers);
return numbers[numbers.length - 1];
}
static int max(int... numbers) {
Arrays.sort(numbers);
return numbers[numbers.length - 1];
}
static double max(double... numbers) {
Arrays.sort(numbers);
return numbers[numbers.length - 1];
}
static int sum(long number) {
int sum = 0;
while (number > 0) {
sum += number % 10;
number /= 10;
}
return sum;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
2,
4,
18,
13,
17,
41,
13,
20,
42,
2,
13,
17,
30,
4,
18,
13,
2,
13,
17,
0,
13,
2,
2,
13,
17,
17,
4,
18,
13,
13,
41,
13,
4,
18,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
14,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
30,
32
],
[
26,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
73,
77
],
[
73,
78
],
[
66,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
6,
90
],
[
90,
91
]
]
| [
"\nimport java.util.*;\n\nclass Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong N = sc.nextLong() -1;\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\twhile(N > 25) {\n\t\t\tlist.add((int)(N % 26));\n\t\t\t N = N / 26 - 1;\n\t\t}\n\t\tlist.add((int)N);\n\t\tchar[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray(); \n\t\tString ans = \"\";\n\t\t\n\t\t//System.out.println(list.size());\n\t\t//System.out.println(list.get(list.size()-1));\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\t\t\n\t}\n}\n\n",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong N = sc.nextLong() -1;\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\twhile(N > 25) {\n\t\t\tlist.add((int)(N % 26));\n\t\t\t N = N / 26 - 1;\n\t\t}\n\t\tlist.add((int)N);\n\t\tchar[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray(); \n\t\tString ans = \"\";\n\t\t\n\t\t//System.out.println(list.size());\n\t\t//System.out.println(list.get(list.size()-1));\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong N = sc.nextLong() -1;\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\twhile(N > 25) {\n\t\t\tlist.add((int)(N % 26));\n\t\t\t N = N / 26 - 1;\n\t\t}\n\t\tlist.add((int)N);\n\t\tchar[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray(); \n\t\tString ans = \"\";\n\t\t\n\t\t//System.out.println(list.size());\n\t\t//System.out.println(list.get(list.size()-1));\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong N = sc.nextLong() -1;\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\twhile(N > 25) {\n\t\t\tlist.add((int)(N % 26));\n\t\t\t N = N / 26 - 1;\n\t\t}\n\t\tlist.add((int)N);\n\t\tchar[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray(); \n\t\tString ans = \"\";\n\t\t\n\t\t//System.out.println(list.size());\n\t\t//System.out.println(list.get(list.size()-1));\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long N = sc.nextLong() -1;",
"N",
"sc.nextLong() -1",
"sc.nextLong()",
"sc.nextLong",
"sc",
"1",
"List<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"while(N > 25) {\n\t\t\tlist.add((int)(N % 26));\n\t\t\t N = N / 26 - 1;\n\t\t}",
"N > 25",
"N",
"25",
"{\n\t\t\tlist.add((int)(N % 26));\n\t\t\t N = N / 26 - 1;\n\t\t}",
"list.add((int)(N % 26))",
"list.add",
"list",
"(int)(N % 26)",
"N",
"26",
"N = N / 26 - 1",
"N",
"N / 26 - 1",
"N / 26",
"N",
"26",
"1",
"list.add((int)N)",
"list.add",
"list",
"(int)N",
"char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();",
"alphabet",
"\"abcdefghijklmnopqrstuvwxyz\".toCharArray()",
"\"abcdefghijklmnopqrstuvwxyz\".toCharArray",
"\"abcdefghijklmnopqrstuvwxyz\"",
"String ans = \"\";",
"ans",
"\"\"",
"for(int i = 0; i < list.size(); i++) {\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < list.size()",
"i",
"list.size()",
"list.size",
"list",
"i++",
"i++",
"i",
"{\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}",
"{\n\t\t\tint index = list.get(list.size()-i-1);\n\t\t\tans += alphabet[index];\n\t\t}",
"int index = list.get(list.size()-i-1);",
"index",
"list.get(list.size()-i-1)",
"list.get",
"list",
"list.size()-i-1",
"list.size()-i-1",
"list.size()",
"list.size",
"list",
"i",
"1",
"ans += alphabet[index]",
"ans",
"alphabet[index]",
"alphabet",
"index",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args"
]
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long N = sc.nextLong() -1;
List<Integer> list = new ArrayList<>();
while(N > 25) {
list.add((int)(N % 26));
N = N / 26 - 1;
}
list.add((int)N);
char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toCharArray();
String ans = "";
//System.out.println(list.size());
//System.out.println(list.get(list.size()-1));
for(int i = 0; i < list.size(); i++) {
int index = list.get(list.size()-i-1);
ans += alphabet[index];
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
4,
13,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
17,
17,
0,
13,
4,
13,
2,
13,
17,
41,
13,
20,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
23,
13,
12,
13,
30,
35,
13,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
34,
17,
1,
29,
17,
29,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
203,
5
],
[
203,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
24,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
6,
61
],
[
61,
62
],
[
203,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
66,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
66,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
66,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
66,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
66,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
66,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
66,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
66,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
66,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
66,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
66,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
66,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
66,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
66,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
66,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
66,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
66,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
66,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
66,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
66,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
66,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
66,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
66,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
66,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
66,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
65,
198
],
[
198,
199
],
[
63,
200
],
[
200,
201
],
[
0,
202
],
[
202,
203
],
[
202,
204
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n\t\tString dogName = \"\";\n\t\twhile(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}\n\t\tdogName += numberToAlphabet(n-1);\n\t\tStringBuffer ans = new StringBuffer(dogName);\n\t\tSystem.out.println(ans.reverse().toString());\n }\n \t\n \tpublic static String numberToAlphabet(long num){\n\t\tswitch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}\n return(\"\");\n }\n \n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n\t\tString dogName = \"\";\n\t\twhile(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}\n\t\tdogName += numberToAlphabet(n-1);\n\t\tStringBuffer ans = new StringBuffer(dogName);\n\t\tSystem.out.println(ans.reverse().toString());\n }\n \t\n \tpublic static String numberToAlphabet(long num){\n\t\tswitch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}\n return(\"\");\n }\n \n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n\t\tString dogName = \"\";\n\t\twhile(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}\n\t\tdogName += numberToAlphabet(n-1);\n\t\tStringBuffer ans = new StringBuffer(dogName);\n\t\tSystem.out.println(ans.reverse().toString());\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n\t\tString dogName = \"\";\n\t\twhile(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}\n\t\tdogName += numberToAlphabet(n-1);\n\t\tStringBuffer ans = new StringBuffer(dogName);\n\t\tSystem.out.println(ans.reverse().toString());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"String dogName = \"\";",
"dogName",
"\"\"",
"while(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}",
"n>26",
"n",
"26",
"{\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}",
"dogName += numberToAlphabet((n-1)%26)",
"dogName",
"numberToAlphabet((n-1)%26)",
"numberToAlphabet",
"(n-1)%26",
"(n-1)",
"n",
"1",
"26",
"n=(n-1)/26",
"n",
"(n-1)/26",
"(n-1)",
"n",
"1",
"26",
"dogName += numberToAlphabet(n-1)",
"dogName",
"numberToAlphabet(n-1)",
"numberToAlphabet",
"n-1",
"n",
"1",
"StringBuffer ans = new StringBuffer(dogName);",
"ans",
"new StringBuffer(dogName)",
"System.out.println(ans.reverse().toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"ans.reverse().toString()",
"ans.reverse().toString",
"ans.reverse()",
"ans.reverse",
"ans",
"String[] args",
"args",
"public static String numberToAlphabet(long num){\n\t\tswitch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}\n return(\"\");\n }",
"numberToAlphabet",
"{\n\t\tswitch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}\n return(\"\");\n }",
"switch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}",
"(int)num",
"case 0:",
"0",
"case 0:",
"return(\"a\");",
"(\"a\")",
"case 1:",
"1",
"case 1:",
"return(\"b\");",
"(\"b\")",
"case 2:",
"2",
"case 2:",
"return(\"c\");",
"(\"c\")",
"case 3:",
"3",
"case 3:",
"return(\"d\");",
"(\"d\")",
"case 4:",
"4",
"case 4:",
"return(\"e\");",
"(\"e\")",
"case 5:",
"5",
"case 5:",
"return(\"f\");",
"(\"f\")",
"case 6:",
"6",
"case 6:",
"return(\"g\");",
"(\"g\")",
"case 7:",
"7",
"case 7:",
"return(\"h\");",
"(\"h\")",
"case 8:",
"8",
"case 8:",
"return(\"i\");",
"(\"i\")",
"case 9:",
"9",
"case 9:",
"return(\"j\");",
"(\"j\")",
"case 10:",
"10",
"case 10:",
"return(\"k\");",
"(\"k\")",
"case 11:",
"11",
"case 11:",
"return(\"l\");",
"(\"l\")",
"case 12:",
"12",
"case 12:",
"return(\"m\");",
"(\"m\")",
"case 13:",
"13",
"case 13:",
"return(\"n\");",
"(\"n\")",
"case 14:",
"14",
"case 14:",
"return(\"o\");",
"(\"o\")",
"case 15:",
"15",
"case 15:",
"return(\"p\");",
"(\"p\")",
"case 16:",
"16",
"case 16:",
"return(\"q\");",
"(\"q\")",
"case 17:",
"17",
"case 17:",
"return(\"r\");",
"(\"r\")",
"case 18:",
"18",
"case 18:",
"return(\"s\");",
"(\"s\")",
"case 19:",
"19",
"case 19:",
"return(\"t\");",
"(\"t\")",
"case 20:",
"20",
"case 20:",
"return(\"u\");",
"(\"u\")",
"case 21:",
"21",
"case 21:",
"return(\"v\");",
"(\"v\")",
"case 22:",
"22",
"case 22:",
"return(\"w\");",
"(\"w\")",
"case 23:",
"23",
"case 23:",
"return(\"x\");",
"(\"x\")",
"case 24:",
"24",
"case 24:",
"return(\"y\");",
"(\"y\")",
"case 25:",
"25",
"case 25:",
"return(\"z\");",
"(\"z\")",
"return(\"\");",
"(\"\")",
"long num",
"num",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n\t\tString dogName = \"\";\n\t\twhile(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}\n\t\tdogName += numberToAlphabet(n-1);\n\t\tStringBuffer ans = new StringBuffer(dogName);\n\t\tSystem.out.println(ans.reverse().toString());\n }\n \t\n \tpublic static String numberToAlphabet(long num){\n\t\tswitch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}\n return(\"\");\n }\n \n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n\t\tString dogName = \"\";\n\t\twhile(n>26){\n\t \t\tdogName += numberToAlphabet((n-1)%26);\n\t\t\tn=(n-1)/26;\n\t\t}\n\t\tdogName += numberToAlphabet(n-1);\n\t\tStringBuffer ans = new StringBuffer(dogName);\n\t\tSystem.out.println(ans.reverse().toString());\n }\n \t\n \tpublic static String numberToAlphabet(long num){\n\t\tswitch ((int)num){\n \tcase 0:\n \treturn(\"a\");\n case 1:\n return(\"b\");\n case 2:\n return(\"c\");\n case 3:\n return(\"d\");\n case 4:\n return(\"e\");\n case 5:\n return(\"f\");\n case 6:\n return(\"g\");\n case 7:\n return(\"h\");\n case 8:\n return(\"i\");\n case 9:\n return(\"j\");\n case 10:\n return(\"k\");\n case 11:\n return(\"l\");\n case 12:\n return(\"m\");\n case 13:\n return(\"n\");\n case 14:\n return(\"o\");\n case 15:\n return(\"p\");\n case 16:\n return(\"q\");\n case 17:\n return(\"r\");\n case 18:\n return(\"s\");\n case 19:\n return(\"t\");\n case 20:\n return(\"u\");\n case 21:\n return(\"v\");\n case 22:\n return(\"w\");\n case 23:\n return(\"x\");\n case 24:\n return(\"y\");\n case 25:\n return(\"z\");\n}\n return(\"\");\n }\n \n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
String dogName = "";
while(n>26){
dogName += numberToAlphabet((n-1)%26);
n=(n-1)/26;
}
dogName += numberToAlphabet(n-1);
StringBuffer ans = new StringBuffer(dogName);
System.out.println(ans.reverse().toString());
}
public static String numberToAlphabet(long num){
switch ((int)num){
case 0:
return("a");
case 1:
return("b");
case 2:
return("c");
case 3:
return("d");
case 4:
return("e");
case 5:
return("f");
case 6:
return("g");
case 7:
return("h");
case 8:
return("i");
case 9:
return("j");
case 10:
return("k");
case 11:
return("l");
case 12:
return("m");
case 13:
return("n");
case 14:
return("o");
case 15:
return("p");
case 16:
return("q");
case 17:
return("r");
case 18:
return("s");
case 19:
return("t");
case 20:
return("u");
case 21:
return("v");
case 22:
return("w");
case 23:
return("x");
case 24:
return("y");
case 25:
return("z");
}
return("");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
4,
13,
17,
13,
42,
2,
13,
13,
30,
40,
13,
0,
13,
4,
13,
17,
13,
0,
13,
2,
13,
4,
13,
17,
13,
40,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
13,
17,
2,
13,
17,
41,
13,
17,
42,
2,
13,
2,
13,
13,
30,
40,
13,
40,
13,
41,
13,
20,
17,
0,
18,
13,
17,
2,
17,
13,
0,
18,
13,
2,
13,
17,
20,
0,
13,
2,
13,
13,
41,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
13,
0,
13,
17,
0,
13,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
17,
0,
13,
20,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
0,
13,
17,
41,
13,
17,
0,
13,
4,
18,
13,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
347,
14
],
[
347,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
15,
24
],
[
24,
25
],
[
347,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
28,
37
],
[
37,
38
],
[
37,
39
],
[
28,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
42,
45
],
[
28,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
55,
58
],
[
28,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
28,
67
],
[
67,
68
],
[
28,
69
],
[
69,
70
],
[
69,
71
],
[
28,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
28,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
106,
109
],
[
109,
110
],
[
109,
111
],
[
103,
112
],
[
112,
113
],
[
112,
114
],
[
103,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
103,
124
],
[
124,
125
],
[
103,
126
],
[
126,
127
],
[
126,
128
],
[
103,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
103,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
103,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
28,
149
],
[
149,
150
],
[
149,
151
],
[
28,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
156,
158
],
[
152,
159
],
[
159,
160
],
[
159,
161
],
[
152,
162
],
[
162,
163
],
[
163,
164
],
[
152,
165
],
[
166,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
169,
171
],
[
28,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
172,
177
],
[
347,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
189,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
188,
199
],
[
199,
200
],
[
199,
201
],
[
188,
202
],
[
202,
203
],
[
202,
204
],
[
180,
205
],
[
205,
206
],
[
178,
207
],
[
207,
208
],
[
178,
209
],
[
209,
210
],
[
347,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
211,
215
],
[
215,
216
],
[
211,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
219,
223
],
[
223,
224
],
[
223,
225
],
[
211,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
229,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
228,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
211,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
252,
253
],
[
252,
254
],
[
248,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
258,
259
],
[
248,
260
],
[
260,
261
],
[
211,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
266,
269
],
[
269,
270
],
[
211,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
276,
277
],
[
275,
278
],
[
278,
279
],
[
211,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
287,
292
],
[
292,
293
],
[
292,
294
],
[
287,
295
],
[
295,
296
],
[
296,
297
],
[
287,
298
],
[
299,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
300,
304
],
[
304,
305
],
[
282,
306
],
[
306,
307
],
[
280,
308
],
[
308,
309
],
[
211,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
317,
322
],
[
322,
323
],
[
322,
324
],
[
317,
325
],
[
325,
326
],
[
326,
327
],
[
317,
328
],
[
329,
329
],
[
329,
330
],
[
330,
331
],
[
331,
332
],
[
331,
333
],
[
330,
334
],
[
334,
335
],
[
312,
336
],
[
336,
337
],
[
310,
338
],
[
338,
339
],
[
211,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
343,
344
],
[
344,
345
],
[
0,
346
],
[
346,
347
],
[
346,
348
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tlong n = fs.nextLong();\n\t\t\n\t\tint digitNum = 1;\n\t\tlong cumulate = pow(26L, digitNum);\n\t\twhile(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}\n\t\t\n\t\t\n\t\tn -= cumulate - pow(26L, digitNum);\n\t\tn--;\n\t\t\n\t\tString[] id = new String[digitNum];\n\t\tfor(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}\n\t\t\n\t\t\n\t\tString ans = \"\";\n\t\tfor(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic long pow(long base, int n) {\n\t\tlong retVal = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}\n\t\treturn retVal;\n\t}\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tlong n = fs.nextLong();\n\t\t\n\t\tint digitNum = 1;\n\t\tlong cumulate = pow(26L, digitNum);\n\t\twhile(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}\n\t\t\n\t\t\n\t\tn -= cumulate - pow(26L, digitNum);\n\t\tn--;\n\t\t\n\t\tString[] id = new String[digitNum];\n\t\tfor(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}\n\t\t\n\t\t\n\t\tString ans = \"\";\n\t\tfor(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic long pow(long base, int n) {\n\t\tlong retVal = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}\n\t\treturn retVal;\n\t}\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}",
"main",
"{\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}",
"Main mainObj = new Main();",
"mainObj",
"new Main()",
"mainObj.solve()",
"mainObj.solve",
"mainObj",
"String[] args",
"args",
"public void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tlong n = fs.nextLong();\n\t\t\n\t\tint digitNum = 1;\n\t\tlong cumulate = pow(26L, digitNum);\n\t\twhile(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}\n\t\t\n\t\t\n\t\tn -= cumulate - pow(26L, digitNum);\n\t\tn--;\n\t\t\n\t\tString[] id = new String[digitNum];\n\t\tfor(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}\n\t\t\n\t\t\n\t\tString ans = \"\";\n\t\tfor(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}",
"solve",
"{\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tlong n = fs.nextLong();\n\t\t\n\t\tint digitNum = 1;\n\t\tlong cumulate = pow(26L, digitNum);\n\t\twhile(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}\n\t\t\n\t\t\n\t\tn -= cumulate - pow(26L, digitNum);\n\t\tn--;\n\t\t\n\t\tString[] id = new String[digitNum];\n\t\tfor(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}\n\t\t\n\t\t\n\t\tString ans = \"\";\n\t\tfor(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"long n = fs.nextLong();",
"n",
"fs.nextLong()",
"fs.nextLong",
"fs",
"int digitNum = 1;",
"digitNum",
"1",
"long cumulate = pow(26L, digitNum);",
"cumulate",
"pow(26L, digitNum)",
"pow",
"26L",
"digitNum",
"while(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}",
"n > cumulate",
"n",
"cumulate",
"{\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}",
"digitNum++",
"digitNum",
"cumulate += pow(26L, digitNum)",
"cumulate",
"pow(26L, digitNum)",
"pow",
"26L",
"digitNum",
"n -= cumulate - pow(26L, digitNum)",
"n",
"cumulate - pow(26L, digitNum)",
"cumulate",
"pow(26L, digitNum)",
"pow",
"26L",
"digitNum",
"n--",
"n",
"String[] id = new String[digitNum];",
"id",
"new String[digitNum]",
"digitNum",
"for(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < digitNum",
"i",
"digitNum",
"i++",
"i++",
"i",
"{\n\t\t\tid[i] = \"a\";\n\t\t}",
"{\n\t\t\tid[i] = \"a\";\n\t\t}",
"id[i] = \"a\"",
"id[i]",
"id",
"i",
"\"a\"",
"for(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}",
"int i = digitNum;",
"int i = digitNum;",
"i",
"digitNum",
"i >= 1",
"i",
"1",
"i--",
"i--",
"i",
"{\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}",
"{\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}",
"long pow = pow(26L, i-1);",
"pow",
"pow(26L, i-1)",
"pow",
"26L",
"i-1",
"i",
"1",
"int num = 1;",
"num",
"1",
"while(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}",
"n >= num * pow",
"n",
"num * pow",
"num",
"pow",
"{\n\t\t\t\tnum++;\n\t\t\t}",
"num++",
"num",
"num--",
"num",
"char[] arr = new char[1];",
"arr",
"new char[1]",
"1",
"arr[0] = (char)(97+num)",
"arr[0]",
"arr",
"0",
"(char)(97+num)",
"97",
"num",
"id[i-1] = new String(arr)",
"id[i-1]",
"id",
"i-1",
"i",
"1",
"new String(arr)",
"n -= pow*num",
"n",
"pow*num",
"pow",
"num",
"String ans = \"\";",
"ans",
"\"\"",
"for(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}",
"int i = digitNum-1;",
"int i = digitNum-1;",
"i",
"digitNum-1",
"digitNum",
"1",
"i >= 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n\t\t\tans+=id[i];\n\t\t}",
"{\n\t\t\tans+=id[i];\n\t\t}",
"ans+=id[i]",
"ans",
"id[i]",
"id",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public long pow(long base, int n) {\n\t\tlong retVal = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}\n\t\treturn retVal;\n\t}",
"pow",
"{\n\t\tlong retVal = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}\n\t\treturn retVal;\n\t}",
"long retVal = 1;",
"retVal",
"1",
"while (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}",
"n > 0",
"n",
"0",
"{\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}",
"if ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}",
"(n & 1) == 1",
"(n & 1)",
"n",
"1",
"1",
"{\n\t\t\t\tretVal *= base;\n\t\t\t}",
"retVal *= base",
"retVal",
"base",
"n >>= 1",
"n",
"1",
"base *= base",
"base",
"base",
"return retVal;",
"retVal",
"long base",
"base",
"int n",
"n",
"public class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}",
"FastScanner",
"BufferedReader reader;",
"reader",
"private StringTokenizer st;",
"st",
"public FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"FastScanner",
"{\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"st = null",
"st",
"null",
"reader = new BufferedReader(new InputStreamReader(System.in))",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"public String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"if (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}",
"st = new StringTokenizer(reader.readLine())",
"st",
"new StringTokenizer(reader.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}",
"nextLine",
"{\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}",
"st = null",
"st",
"null",
"String readLine = null;",
"readLine",
"null",
"readLine = reader.readLine()",
"readLine",
"reader.readLine()",
"reader.readLine",
"reader",
"return readLine;",
"readLine",
"public int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}",
"nextIntArr",
"{\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}",
"int[] retArr = new int[n];",
"retArr",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}",
"{\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}",
"retArr[i] = nextInt()",
"retArr[i]",
"retArr",
"i",
"nextInt()",
"nextInt",
"return retArr;",
"retArr",
"int n",
"n",
"public long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}",
"nextLongArr",
"{\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}",
"long[] retArr = new long[n];",
"retArr",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}",
"{\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}",
"retArr[i] = nextLong()",
"retArr[i]",
"retArr",
"i",
"nextLong()",
"nextLong",
"return retArr;",
"retArr",
"int n",
"n",
"public void close() throws IOException {\n\t\t\treader.close();\n\t\t}",
"close",
"{\n\t\t\treader.close();\n\t\t}",
"reader.close()",
"reader.close",
"reader",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tlong n = fs.nextLong();\n\t\t\n\t\tint digitNum = 1;\n\t\tlong cumulate = pow(26L, digitNum);\n\t\twhile(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}\n\t\t\n\t\t\n\t\tn -= cumulate - pow(26L, digitNum);\n\t\tn--;\n\t\t\n\t\tString[] id = new String[digitNum];\n\t\tfor(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}\n\t\t\n\t\t\n\t\tString ans = \"\";\n\t\tfor(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic long pow(long base, int n) {\n\t\tlong retVal = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}\n\t\treturn retVal;\n\t}\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tlong n = fs.nextLong();\n\t\t\n\t\tint digitNum = 1;\n\t\tlong cumulate = pow(26L, digitNum);\n\t\twhile(n > cumulate) {\n\t\t\tdigitNum++;\n\t\t\tcumulate += pow(26L, digitNum);\n\t\t}\n\t\t\n\t\t\n\t\tn -= cumulate - pow(26L, digitNum);\n\t\tn--;\n\t\t\n\t\tString[] id = new String[digitNum];\n\t\tfor(int i = 0; i < digitNum; i++) {\n\t\t\tid[i] = \"a\";\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = digitNum; i >= 1; i--) {\n\t\t\t\n//\t\t\tlong sub = 0;\n//\t\t\tfor(int j = 1; j <= digitNum-1;j++) {\n//\t\t\t\tsub += pow(26L, j);\n//\t\t\t}\n\t\t\t\n\t\t\tlong pow = pow(26L, i-1);\n\t\t\tint num = 1;\n\t\t\twhile(n >= num * pow) {\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\tnum--;\n\t\t\t\n\t\t\t\n\t\t\tchar[] arr = new char[1];\n\t\t\tarr[0] = (char)(97+num);\n//\t\t\tSystem.out.println(num);\n\t\t\tid[i-1] = new String(arr);\n\t\t\tn -= pow*num;\n\t\t}\n\t\t\n\t\t\n\t\tString ans = \"\";\n\t\tfor(int i = digitNum-1; i >= 0; i--) {\n\t\t\tans+=id[i];\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic long pow(long base, int n) {\n\t\tlong retVal = 1;\n\t\twhile (n > 0) {\n\t\t\tif ((n & 1) == 1) {\n\t\t\t\tretVal *= base;\n\t\t\t}\n\t\t\tn >>= 1;\n\t\t\tbase *= base;\n\t\t}\n\t\treturn retVal;\n\t}\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
Main mainObj = new Main();
mainObj.solve();
}
public void solve() throws IOException {
FastScanner fs = new FastScanner();
long n = fs.nextLong();
int digitNum = 1;
long cumulate = pow(26L, digitNum);
while(n > cumulate) {
digitNum++;
cumulate += pow(26L, digitNum);
}
n -= cumulate - pow(26L, digitNum);
n--;
String[] id = new String[digitNum];
for(int i = 0; i < digitNum; i++) {
id[i] = "a";
}
for(int i = digitNum; i >= 1; i--) {
// long sub = 0;
// for(int j = 1; j <= digitNum-1;j++) {
// sub += pow(26L, j);
// }
long pow = pow(26L, i-1);
int num = 1;
while(n >= num * pow) {
num++;
}
num--;
char[] arr = new char[1];
arr[0] = (char)(97+num);
// System.out.println(num);
id[i-1] = new String(arr);
n -= pow*num;
}
String ans = "";
for(int i = digitNum-1; i >= 0; i--) {
ans+=id[i];
}
System.out.println(ans);
}
public long pow(long base, int n) {
long retVal = 1;
while (n > 0) {
if ((n & 1) == 1) {
retVal *= base;
}
n >>= 1;
base *= base;
}
return retVal;
}
public class FastScanner {
BufferedReader reader;
private StringTokenizer st;
public FastScanner() {
st = null;
reader = new BufferedReader(new InputStreamReader(System.in));
}
public String next() throws IOException {
if (st == null || !st.hasMoreElements()) {
st = new StringTokenizer(reader.readLine());
}
return st.nextToken();
}
public String nextLine() throws IOException {
st = null;
String readLine = null;
readLine = reader.readLine();
return readLine;
}
public int nextInt() throws NumberFormatException, IOException {
return Integer.parseInt(next());
}
public long nextLong() throws NumberFormatException, IOException {
return Long.parseLong(next());
}
public int[] nextIntArr(int n) throws NumberFormatException, IOException {
int[] retArr = new int[n];
for (int i = 0; i < n; i++) {
retArr[i] = nextInt();
}
return retArr;
}
public long[] nextLongArr(int n) throws NumberFormatException, IOException {
long[] retArr = new long[n];
for (int i = 0; i < n; i++) {
retArr[i] = nextLong();
}
return retArr;
}
public void close() throws IOException {
reader.close();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
40,
13,
41,
13,
2,
13,
17,
41,
13,
2,
13,
17,
0,
13,
2,
13,
13,
0,
13,
2,
2,
13,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
22,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
22,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
14,
47
],
[
47,
48
],
[
12,
49
],
[
49,
50
],
[
10,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
53,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
51,
70
],
[
70,
71
]
]
| [
"import java.lang.*; \nimport java.io.*; \nimport java.util.*; \n \nclass Main {\n// Driver code\n public static String getAlpha(long num) {\n\n String result = \"\";\n while (num > 0) {\n num--; // 1 => a, not 0 => a\n long remainder = num % 26;\n char digit = (char) (remainder + 97);\n result = digit + result;\n num = (num - remainder) / 26;\n }\n\n return result;\n } \npublic static void main (String[] args) \n{ \n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n System.out.println(getAlpha(n));\n} \n} ",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main {\n// Driver code\n public static String getAlpha(long num) {\n\n String result = \"\";\n while (num > 0) {\n num--; // 1 => a, not 0 => a\n long remainder = num % 26;\n char digit = (char) (remainder + 97);\n result = digit + result;\n num = (num - remainder) / 26;\n }\n\n return result;\n } \npublic static void main (String[] args) \n{ \n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n System.out.println(getAlpha(n));\n} \n}",
"Main",
"// Driver code\n public static String getAlpha(long num) {\n\n String result = \"\";\n while (num > 0) {\n num--; // 1 => a, not 0 => a\n long remainder = num % 26;\n char digit = (char) (remainder + 97);\n result = digit + result;\n num = (num - remainder) / 26;\n }\n\n return result;\n }",
"getAlpha",
"{\n\n String result = \"\";\n while (num > 0) {\n num--; // 1 => a, not 0 => a\n long remainder = num % 26;\n char digit = (char) (remainder + 97);\n result = digit + result;\n num = (num - remainder) / 26;\n }\n\n return result;\n }",
"String result = \"\";",
"result",
"\"\"",
"while (num > 0) {\n num--; // 1 => a, not 0 => a\n long remainder = num % 26;\n char digit = (char) (remainder + 97);\n result = digit + result;\n num = (num - remainder) / 26;\n }",
"num > 0",
"num",
"0",
"{\n num--; // 1 => a, not 0 => a\n long remainder = num % 26;\n char digit = (char) (remainder + 97);\n result = digit + result;\n num = (num - remainder) / 26;\n }",
"num--",
"num",
"long remainder = num % 26;",
"remainder",
"num % 26",
"num",
"26",
"char digit = (char) (remainder + 97);",
"digit",
"(char) (remainder + 97)",
"remainder",
"97",
"result = digit + result",
"result",
"digit + result",
"digit",
"result",
"num = (num - remainder) / 26",
"num",
"(num - remainder) / 26",
"(num - remainder)",
"num",
"remainder",
"26",
"return result;",
"result",
"long num",
"num",
"public static void main (String[] args) \n{ \n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n System.out.println(getAlpha(n));\n}",
"main",
"{ \n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n System.out.println(getAlpha(n));\n}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"System.out.println(getAlpha(n))",
"System.out.println",
"System.out",
"System",
"System.out",
"getAlpha(n)",
"getAlpha",
"n",
"String[] args",
"args"
]
| import java.lang.*;
import java.io.*;
import java.util.*;
class Main {
// Driver code
public static String getAlpha(long num) {
String result = "";
while (num > 0) {
num--; // 1 => a, not 0 => a
long remainder = num % 26;
char digit = (char) (remainder + 97);
result = digit + result;
num = (num - remainder) / 26;
}
return result;
}
public static void main (String[] args)
{
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
System.out.println(getAlpha(n));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
42,
2,
13,
17,
30,
0,
13,
17,
41,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
55,
5
],
[
55,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
24,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
24,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
6,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n StringBuilder sb = new StringBuilder();\n while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n StringBuilder sb = new StringBuilder();\n while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n StringBuilder sb = new StringBuilder();\n while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }\n System.out.println(sb.reverse().toString());\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n StringBuilder sb = new StringBuilder();\n while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }\n System.out.println(sb.reverse().toString());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }",
"n>0",
"n",
"0",
"{\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }",
"n -=1",
"n",
"1",
"long amari = n % 26;",
"amari",
"n % 26",
"n",
"26",
"sb.append((char)(amari + 'a'))",
"sb.append",
"sb",
"(char)(amari + 'a')",
"amari",
"'a'",
"n /= 26",
"n",
"26",
"System.out.println(sb.reverse().toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.reverse().toString()",
"sb.reverse().toString",
"sb.reverse()",
"sb.reverse",
"sb",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n StringBuilder sb = new StringBuilder();\n while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n StringBuilder sb = new StringBuilder();\n while (n>0) {\n n -=1;\n long amari = n % 26;\n sb.append((char)(amari + 'a'));\n n /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
StringBuilder sb = new StringBuilder();
while (n>0) {
n -=1;
long amari = n % 26;
sb.append((char)(amari + 'a'));
n /= 26;
}
System.out.println(sb.reverse().toString());
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
2,
13,
17,
17,
41,
13,
4,
18,
13,
13,
17,
4,
18,
13,
2,
17,
13,
30,
42,
2,
4,
18,
13,
17,
30,
14,
4,
18,
4,
18,
13,
2,
4,
18,
13,
17,
17,
30,
41,
13,
2,
4,
18,
13,
13,
17,
17,
41,
13,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
2,
17,
13,
0,
13,
13,
40,
13,
30,
41,
13,
2,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
17,
4,
18,
13,
2,
17,
13,
0,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
177,
5
],
[
177,
6
],
[
6,
7
],
[
6,
8
],
[
177,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
25,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
11,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
48,
54
],
[
45,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
45,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
65,
67
],
[
41,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
82,
86
],
[
77,
87
],
[
76,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
92,
96
],
[
91,
97
],
[
88,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
100,
104
],
[
88,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
113,
117
],
[
107,
118
],
[
88,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
122,
123
],
[
122,
124
],
[
88,
125
],
[
125,
126
],
[
125,
127
],
[
88,
128
],
[
128,
129
],
[
76,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
140,
144
],
[
134,
145
],
[
133,
146
],
[
130,
147
],
[
147,
148
],
[
148,
149
],
[
147,
150
],
[
150,
151
],
[
150,
152
],
[
75,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
159,
163
],
[
11,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
9,
174
],
[
174,
175
],
[
0,
176
],
[
176,
177
],
[
176,
178
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static final int MOD = 1000000007;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = Long.parseLong(sc.next());\n String s = Long.toString(n, 26);\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n int idx = 0;\n if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static final int MOD = 1000000007;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = Long.parseLong(sc.next());\n String s = Long.toString(n, 26);\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n int idx = 0;\n if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"Main",
"public static final int MOD = 1000000007;",
"MOD",
"1000000007",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = Long.parseLong(sc.next());\n String s = Long.toString(n, 26);\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n int idx = 0;\n if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }\n System.out.println(sb.reverse().toString());\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long n = Long.parseLong(sc.next());\n String s = Long.toString(n, 26);\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n int idx = 0;\n if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }\n System.out.println(sb.reverse().toString());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = Long.parseLong(sc.next());",
"n",
"Long.parseLong(sc.next())",
"Long.parseLong",
"Long",
"sc.next()",
"sc.next",
"sc",
"String s = Long.toString(n, 26);",
"s",
"Long.toString(n, 26)",
"Long.toString",
"Long",
"n",
"26",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int len = s.length();",
"len",
"s.length()",
"s.length",
"s",
"int idx = 0;",
"idx",
"0",
"if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }",
"n <= 26",
"n",
"26",
"{\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n }",
"s = Long.toString(n - 1, 26)",
"s",
"Long.toString(n - 1, 26)",
"Long.toString",
"Long",
"n - 1",
"n",
"1",
"26",
"int num = Integer.parseInt(s, 26);",
"num",
"Integer.parseInt(s, 26)",
"Integer.parseInt",
"Integer",
"s",
"26",
"sb.append((char) ('a' + num))",
"sb.append",
"sb",
"(char) ('a' + num)",
"'a'",
"num",
"{\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }",
"while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }",
"s.length() >= 1",
"s.length()",
"s.length",
"s",
"1",
"{\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }",
"if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }",
"s.substring(s.length() - 1).equals(\"0\")",
"s.substring(s.length() - 1).equals",
"s.substring(s.length() - 1)",
"s.substring",
"s",
"s.length() - 1",
"s.length()",
"s.length",
"s",
"1",
"\"0\"",
"{\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n }",
"long dec = Long.parseLong(s, 26) - 1;",
"dec",
"Long.parseLong(s, 26) - 1",
"Long.parseLong(s, 26)",
"Long.parseLong",
"Long",
"s",
"26",
"1",
"String ss = Long.toString(dec, 26);",
"ss",
"Long.toString(dec, 26)",
"Long.toString",
"Long",
"dec",
"26",
"int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);",
"num",
"Integer.parseInt(ss.substring(ss.length() - 1), 26)",
"Integer.parseInt",
"Integer",
"ss.substring(ss.length() - 1)",
"ss.substring",
"ss",
"ss.length() - 1",
"ss.length()",
"ss.length",
"ss",
"1",
"26",
"sb.append((char) ('a' + num))",
"sb.append",
"sb",
"(char) ('a' + num)",
"'a'",
"num",
"s = ss",
"s",
"ss",
"idx++",
"idx",
"{\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }",
"int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;",
"num",
"Integer.parseInt(s.substring(s.length() - 1), 26) - 1",
"Integer.parseInt(s.substring(s.length() - 1), 26)",
"Integer.parseInt",
"Integer",
"s.substring(s.length() - 1)",
"s.substring",
"s",
"s.length() - 1",
"s.length()",
"s.length",
"s",
"1",
"26",
"1",
"sb.append((char) ('a' + num))",
"sb.append",
"sb",
"(char) ('a' + num)",
"'a'",
"num",
"s = s.substring(0, s.length() - 1)",
"s",
"s.substring(0, s.length() - 1)",
"s.substring",
"s",
"0",
"s.length() - 1",
"s.length()",
"s.length",
"s",
"1",
"System.out.println(sb.reverse().toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.reverse().toString()",
"sb.reverse().toString",
"sb.reverse()",
"sb.reverse",
"sb",
"String[] args",
"args",
"public class Main {\n\n public static final int MOD = 1000000007;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = Long.parseLong(sc.next());\n String s = Long.toString(n, 26);\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n int idx = 0;\n if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"public class Main {\n\n public static final int MOD = 1000000007;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = Long.parseLong(sc.next());\n String s = Long.toString(n, 26);\n StringBuilder sb = new StringBuilder();\n int len = s.length();\n int idx = 0;\n if (n <= 26) {\n s = Long.toString(n - 1, 26);\n int num = Integer.parseInt(s, 26);\n sb.append((char) ('a' + num));\n } else {\n while (s.length() >= 1) {\n if (s.substring(s.length() - 1).equals(\"0\")) {\n long dec = Long.parseLong(s, 26) - 1;\n String ss = Long.toString(dec, 26);\n int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);\n sb.append((char) ('a' + num));\n s = ss;\n idx++;\n } else {\n int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;\n sb.append((char) ('a' + num));\n }\n s = s.substring(0, s.length() - 1);\n }\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static final int MOD = 1000000007;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = Long.parseLong(sc.next());
String s = Long.toString(n, 26);
StringBuilder sb = new StringBuilder();
int len = s.length();
int idx = 0;
if (n <= 26) {
s = Long.toString(n - 1, 26);
int num = Integer.parseInt(s, 26);
sb.append((char) ('a' + num));
} else {
while (s.length() >= 1) {
if (s.substring(s.length() - 1).equals("0")) {
long dec = Long.parseLong(s, 26) - 1;
String ss = Long.toString(dec, 26);
int num = Integer.parseInt(ss.substring(ss.length() - 1), 26);
sb.append((char) ('a' + num));
s = ss;
idx++;
} else {
int num = Integer.parseInt(s.substring(s.length() - 1), 26) - 1;
sb.append((char) ('a' + num));
}
s = s.substring(0, s.length() - 1);
}
}
System.out.println(sb.reverse().toString());
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
40,
13,
41,
13,
20,
42,
17,
30,
4,
18,
13,
17,
2,
13,
17,
14,
2,
2,
13,
17,
17,
3,
30,
0,
13,
17,
40,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
75,
8
],
[
75,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
11,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
41,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
11,
54
],
[
54,
55
],
[
54,
56
],
[
54,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
11,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
9,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.lang.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str = scan.next();\n\n long num = Long.parseLong(str);\n num--;\n\n ArrayList<Long> list = new ArrayList<>();\n\n while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }\n\n for (long i : list) {\n System.out.print((char)(i + 'a'));\n }\n System.out.println();\n }\n}",
"import java.lang.*;",
"lang.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str = scan.next();\n\n long num = Long.parseLong(str);\n num--;\n\n ArrayList<Long> list = new ArrayList<>();\n\n while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }\n\n for (long i : list) {\n System.out.print((char)(i + 'a'));\n }\n System.out.println();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str = scan.next();\n\n long num = Long.parseLong(str);\n num--;\n\n ArrayList<Long> list = new ArrayList<>();\n\n while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }\n\n for (long i : list) {\n System.out.print((char)(i + 'a'));\n }\n System.out.println();\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n\n String str = scan.next();\n\n long num = Long.parseLong(str);\n num--;\n\n ArrayList<Long> list = new ArrayList<>();\n\n while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }\n\n for (long i : list) {\n System.out.print((char)(i + 'a'));\n }\n System.out.println();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String str = scan.next();",
"str",
"scan.next()",
"scan.next",
"scan",
"long num = Long.parseLong(str);",
"num",
"Long.parseLong(str)",
"Long.parseLong",
"Long",
"str",
"num--",
"num",
"ArrayList<Long> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }",
"true",
"{\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }",
"list.add(0, num % 26)",
"list.add",
"list",
"0",
"num % 26",
"num",
"26",
"if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }",
"num / 26 == 0",
"num / 26",
"num",
"26",
"0",
"break;",
"{\n num /= 26;\n num--;\n }",
"num /= 26",
"num",
"26",
"num--",
"num",
"for (long i : list) {\n System.out.print((char)(i + 'a'));\n }",
"long i",
"list",
"{\n System.out.print((char)(i + 'a'));\n }",
"{\n System.out.print((char)(i + 'a'));\n }",
"System.out.print((char)(i + 'a'))",
"System.out.print",
"System.out",
"System",
"System.out",
"(char)(i + 'a')",
"i",
"'a'",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str = scan.next();\n\n long num = Long.parseLong(str);\n num--;\n\n ArrayList<Long> list = new ArrayList<>();\n\n while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }\n\n for (long i : list) {\n System.out.print((char)(i + 'a'));\n }\n System.out.println();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str = scan.next();\n\n long num = Long.parseLong(str);\n num--;\n\n ArrayList<Long> list = new ArrayList<>();\n\n while (true) {\n list.add(0, num % 26);\n if (num / 26 == 0) break;\n else {\n num /= 26;\n num--;\n }\n }\n\n for (long i : list) {\n System.out.print((char)(i + 'a'));\n }\n System.out.println();\n }\n}",
"Main"
]
| import java.lang.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str = scan.next();
long num = Long.parseLong(str);
num--;
ArrayList<Long> list = new ArrayList<>();
while (true) {
list.add(0, num % 26);
if (num / 26 == 0) break;
else {
num /= 26;
num--;
}
}
for (long i : list) {
System.out.print((char)(i + 'a'));
}
System.out.println();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
3,
41,
13,
2,
13,
17,
0,
13,
2,
13,
4,
13,
13,
14,
2,
13,
17,
0,
13,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
17,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
29,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
276,
5
],
[
276,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
32,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
32,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
32,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
51,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
8,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
276,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
88,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
88,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
88,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
88,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
88,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
135,
136
],
[
136,
137
],
[
88,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
143,
144
],
[
88,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
150,
151
],
[
88,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
157,
158
],
[
88,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
88,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
171,
172
],
[
88,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
177,
178
],
[
178,
179
],
[
88,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
185,
186
],
[
88,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
192,
193
],
[
88,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
198,
199
],
[
199,
200
],
[
88,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
205
],
[
205,
206
],
[
206,
207
],
[
88,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
208,
212
],
[
212,
213
],
[
213,
214
],
[
88,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
215,
219
],
[
219,
220
],
[
220,
221
],
[
88,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
222,
226
],
[
226,
227
],
[
227,
228
],
[
88,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
234,
235
],
[
88,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
236,
240
],
[
240,
241
],
[
241,
242
],
[
88,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
247,
248
],
[
248,
249
],
[
88,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
250,
254
],
[
254,
255
],
[
255,
256
],
[
88,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
261,
262
],
[
262,
263
],
[
88,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
264,
268
],
[
268,
269
],
[
269,
270
],
[
88,
271
],
[
271,
272
],
[
86,
273
],
[
273,
274
],
[
0,
275
],
[
275,
276
],
[
275,
277
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n \tString s=\"\";\n for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }\n StringBuffer buf = new StringBuffer(s);\n String ans = buf.reverse().toString();\n System.out.println(ans);\n }\n \n public static String alphabet(long i){\n \tif(i==1){return(\"a\");}\n if(i==2){return(\"b\");}\n if(i==3){return(\"c\");}\n if(i==4){return(\"d\");}\n if(i==5){return(\"e\");}\n if(i==6){return(\"f\");}\n if(i==7){return(\"g\");}\n if(i==8){return(\"h\");}\n if(i==9){return(\"i\");}\n if(i==10){return(\"j\");}\n if(i==11){return(\"k\");}\n if(i==12){return(\"l\");}\n if(i==13){return(\"m\");}\n if(i==14){return(\"n\");}\n if(i==15){return(\"o\");}\n if(i==16){return(\"p\");}\n if(i==17){return(\"q\");}\n if(i==18){return(\"r\");}\n if(i==19){return(\"s\");}\n if(i==20){return(\"t\");}\n if(i==21){return(\"u\");}\n if(i==22){return(\"v\");}\n if(i==23){return(\"w\");}\n if(i==24){return(\"x\");}\n if(i==25){return(\"y\");}\n if(i==0){return(\"z\");}\n return(\"\");\n }\n \n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n \tString s=\"\";\n for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }\n StringBuffer buf = new StringBuffer(s);\n String ans = buf.reverse().toString();\n System.out.println(ans);\n }\n \n public static String alphabet(long i){\n \tif(i==1){return(\"a\");}\n if(i==2){return(\"b\");}\n if(i==3){return(\"c\");}\n if(i==4){return(\"d\");}\n if(i==5){return(\"e\");}\n if(i==6){return(\"f\");}\n if(i==7){return(\"g\");}\n if(i==8){return(\"h\");}\n if(i==9){return(\"i\");}\n if(i==10){return(\"j\");}\n if(i==11){return(\"k\");}\n if(i==12){return(\"l\");}\n if(i==13){return(\"m\");}\n if(i==14){return(\"n\");}\n if(i==15){return(\"o\");}\n if(i==16){return(\"p\");}\n if(i==17){return(\"q\");}\n if(i==18){return(\"r\");}\n if(i==19){return(\"s\");}\n if(i==20){return(\"t\");}\n if(i==21){return(\"u\");}\n if(i==22){return(\"v\");}\n if(i==23){return(\"w\");}\n if(i==24){return(\"x\");}\n if(i==25){return(\"y\");}\n if(i==0){return(\"z\");}\n return(\"\");\n }\n \n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n \tString s=\"\";\n for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }\n StringBuffer buf = new StringBuffer(s);\n String ans = buf.reverse().toString();\n System.out.println(ans);\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n \tString s=\"\";\n for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }\n StringBuffer buf = new StringBuffer(s);\n String ans = buf.reverse().toString();\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"String s=\"\";",
"s",
"\"\"",
"for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<15",
"i",
"15",
"i++",
"i++",
"i",
"{\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }",
"{\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }",
"if(n==0){break;}",
"n==0",
"n",
"0",
"{break;}",
"break;",
"long a =n%26;",
"a",
"n%26",
"n",
"26",
"s=s+alphabet(a)",
"s",
"s+alphabet(a)",
"s",
"alphabet(a)",
"alphabet",
"a",
"if(a!=0)n=n/26;\n else{n=n/26-1;}",
"a!=0",
"a",
"0",
"n=n/26",
"n",
"n/26",
"n",
"26",
"{n=n/26-1;}",
"n=n/26-1",
"n",
"n/26-1",
"n/26",
"n",
"26",
"1",
"StringBuffer buf = new StringBuffer(s);",
"buf",
"new StringBuffer(s)",
"String ans = buf.reverse().toString();",
"ans",
"buf.reverse().toString()",
"buf.reverse().toString",
"buf.reverse()",
"buf.reverse",
"buf",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public static String alphabet(long i){\n \tif(i==1){return(\"a\");}\n if(i==2){return(\"b\");}\n if(i==3){return(\"c\");}\n if(i==4){return(\"d\");}\n if(i==5){return(\"e\");}\n if(i==6){return(\"f\");}\n if(i==7){return(\"g\");}\n if(i==8){return(\"h\");}\n if(i==9){return(\"i\");}\n if(i==10){return(\"j\");}\n if(i==11){return(\"k\");}\n if(i==12){return(\"l\");}\n if(i==13){return(\"m\");}\n if(i==14){return(\"n\");}\n if(i==15){return(\"o\");}\n if(i==16){return(\"p\");}\n if(i==17){return(\"q\");}\n if(i==18){return(\"r\");}\n if(i==19){return(\"s\");}\n if(i==20){return(\"t\");}\n if(i==21){return(\"u\");}\n if(i==22){return(\"v\");}\n if(i==23){return(\"w\");}\n if(i==24){return(\"x\");}\n if(i==25){return(\"y\");}\n if(i==0){return(\"z\");}\n return(\"\");\n }",
"alphabet",
"{\n \tif(i==1){return(\"a\");}\n if(i==2){return(\"b\");}\n if(i==3){return(\"c\");}\n if(i==4){return(\"d\");}\n if(i==5){return(\"e\");}\n if(i==6){return(\"f\");}\n if(i==7){return(\"g\");}\n if(i==8){return(\"h\");}\n if(i==9){return(\"i\");}\n if(i==10){return(\"j\");}\n if(i==11){return(\"k\");}\n if(i==12){return(\"l\");}\n if(i==13){return(\"m\");}\n if(i==14){return(\"n\");}\n if(i==15){return(\"o\");}\n if(i==16){return(\"p\");}\n if(i==17){return(\"q\");}\n if(i==18){return(\"r\");}\n if(i==19){return(\"s\");}\n if(i==20){return(\"t\");}\n if(i==21){return(\"u\");}\n if(i==22){return(\"v\");}\n if(i==23){return(\"w\");}\n if(i==24){return(\"x\");}\n if(i==25){return(\"y\");}\n if(i==0){return(\"z\");}\n return(\"\");\n }",
"if(i==1){return(\"a\");}",
"i==1",
"i",
"1",
"{return(\"a\");}",
"return(\"a\");",
"(\"a\")",
"if(i==2){return(\"b\");}",
"i==2",
"i",
"2",
"{return(\"b\");}",
"return(\"b\");",
"(\"b\")",
"if(i==3){return(\"c\");}",
"i==3",
"i",
"3",
"{return(\"c\");}",
"return(\"c\");",
"(\"c\")",
"if(i==4){return(\"d\");}",
"i==4",
"i",
"4",
"{return(\"d\");}",
"return(\"d\");",
"(\"d\")",
"if(i==5){return(\"e\");}",
"i==5",
"i",
"5",
"{return(\"e\");}",
"return(\"e\");",
"(\"e\")",
"if(i==6){return(\"f\");}",
"i==6",
"i",
"6",
"{return(\"f\");}",
"return(\"f\");",
"(\"f\")",
"if(i==7){return(\"g\");}",
"i==7",
"i",
"7",
"{return(\"g\");}",
"return(\"g\");",
"(\"g\")",
"if(i==8){return(\"h\");}",
"i==8",
"i",
"8",
"{return(\"h\");}",
"return(\"h\");",
"(\"h\")",
"if(i==9){return(\"i\");}",
"i==9",
"i",
"9",
"{return(\"i\");}",
"return(\"i\");",
"(\"i\")",
"if(i==10){return(\"j\");}",
"i==10",
"i",
"10",
"{return(\"j\");}",
"return(\"j\");",
"(\"j\")",
"if(i==11){return(\"k\");}",
"i==11",
"i",
"11",
"{return(\"k\");}",
"return(\"k\");",
"(\"k\")",
"if(i==12){return(\"l\");}",
"i==12",
"i",
"12",
"{return(\"l\");}",
"return(\"l\");",
"(\"l\")",
"if(i==13){return(\"m\");}",
"i==13",
"i",
"13",
"{return(\"m\");}",
"return(\"m\");",
"(\"m\")",
"if(i==14){return(\"n\");}",
"i==14",
"i",
"14",
"{return(\"n\");}",
"return(\"n\");",
"(\"n\")",
"if(i==15){return(\"o\");}",
"i==15",
"i",
"15",
"{return(\"o\");}",
"return(\"o\");",
"(\"o\")",
"if(i==16){return(\"p\");}",
"i==16",
"i",
"16",
"{return(\"p\");}",
"return(\"p\");",
"(\"p\")",
"if(i==17){return(\"q\");}",
"i==17",
"i",
"17",
"{return(\"q\");}",
"return(\"q\");",
"(\"q\")",
"if(i==18){return(\"r\");}",
"i==18",
"i",
"18",
"{return(\"r\");}",
"return(\"r\");",
"(\"r\")",
"if(i==19){return(\"s\");}",
"i==19",
"i",
"19",
"{return(\"s\");}",
"return(\"s\");",
"(\"s\")",
"if(i==20){return(\"t\");}",
"i==20",
"i",
"20",
"{return(\"t\");}",
"return(\"t\");",
"(\"t\")",
"if(i==21){return(\"u\");}",
"i==21",
"i",
"21",
"{return(\"u\");}",
"return(\"u\");",
"(\"u\")",
"if(i==22){return(\"v\");}",
"i==22",
"i",
"22",
"{return(\"v\");}",
"return(\"v\");",
"(\"v\")",
"if(i==23){return(\"w\");}",
"i==23",
"i",
"23",
"{return(\"w\");}",
"return(\"w\");",
"(\"w\")",
"if(i==24){return(\"x\");}",
"i==24",
"i",
"24",
"{return(\"x\");}",
"return(\"x\");",
"(\"x\")",
"if(i==25){return(\"y\");}",
"i==25",
"i",
"25",
"{return(\"y\");}",
"return(\"y\");",
"(\"y\")",
"if(i==0){return(\"z\");}",
"i==0",
"i",
"0",
"{return(\"z\");}",
"return(\"z\");",
"(\"z\")",
"return(\"\");",
"(\"\")",
"long i",
"i",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n \tString s=\"\";\n for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }\n StringBuffer buf = new StringBuffer(s);\n String ans = buf.reverse().toString();\n System.out.println(ans);\n }\n \n public static String alphabet(long i){\n \tif(i==1){return(\"a\");}\n if(i==2){return(\"b\");}\n if(i==3){return(\"c\");}\n if(i==4){return(\"d\");}\n if(i==5){return(\"e\");}\n if(i==6){return(\"f\");}\n if(i==7){return(\"g\");}\n if(i==8){return(\"h\");}\n if(i==9){return(\"i\");}\n if(i==10){return(\"j\");}\n if(i==11){return(\"k\");}\n if(i==12){return(\"l\");}\n if(i==13){return(\"m\");}\n if(i==14){return(\"n\");}\n if(i==15){return(\"o\");}\n if(i==16){return(\"p\");}\n if(i==17){return(\"q\");}\n if(i==18){return(\"r\");}\n if(i==19){return(\"s\");}\n if(i==20){return(\"t\");}\n if(i==21){return(\"u\");}\n if(i==22){return(\"v\");}\n if(i==23){return(\"w\");}\n if(i==24){return(\"x\");}\n if(i==25){return(\"y\");}\n if(i==0){return(\"z\");}\n return(\"\");\n }\n \n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n = sc.nextLong();\n \tString s=\"\";\n for(int i=0;i<15;i++){\n if(n==0){break;}\n \tlong a =n%26;\n \ts=s+alphabet(a);\n \tif(a!=0)n=n/26;\n else{n=n/26-1;}\n }\n StringBuffer buf = new StringBuffer(s);\n String ans = buf.reverse().toString();\n System.out.println(ans);\n }\n \n public static String alphabet(long i){\n \tif(i==1){return(\"a\");}\n if(i==2){return(\"b\");}\n if(i==3){return(\"c\");}\n if(i==4){return(\"d\");}\n if(i==5){return(\"e\");}\n if(i==6){return(\"f\");}\n if(i==7){return(\"g\");}\n if(i==8){return(\"h\");}\n if(i==9){return(\"i\");}\n if(i==10){return(\"j\");}\n if(i==11){return(\"k\");}\n if(i==12){return(\"l\");}\n if(i==13){return(\"m\");}\n if(i==14){return(\"n\");}\n if(i==15){return(\"o\");}\n if(i==16){return(\"p\");}\n if(i==17){return(\"q\");}\n if(i==18){return(\"r\");}\n if(i==19){return(\"s\");}\n if(i==20){return(\"t\");}\n if(i==21){return(\"u\");}\n if(i==22){return(\"v\");}\n if(i==23){return(\"w\");}\n if(i==24){return(\"x\");}\n if(i==25){return(\"y\");}\n if(i==0){return(\"z\");}\n return(\"\");\n }\n \n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
String s="";
for(int i=0;i<15;i++){
if(n==0){break;}
long a =n%26;
s=s+alphabet(a);
if(a!=0)n=n/26;
else{n=n/26-1;}
}
StringBuffer buf = new StringBuffer(s);
String ans = buf.reverse().toString();
System.out.println(ans);
}
public static String alphabet(long i){
if(i==1){return("a");}
if(i==2){return("b");}
if(i==3){return("c");}
if(i==4){return("d");}
if(i==5){return("e");}
if(i==6){return("f");}
if(i==7){return("g");}
if(i==8){return("h");}
if(i==9){return("i");}
if(i==10){return("j");}
if(i==11){return("k");}
if(i==12){return("l");}
if(i==13){return("m");}
if(i==14){return("n");}
if(i==15){return("o");}
if(i==16){return("p");}
if(i==17){return("q");}
if(i==18){return("r");}
if(i==19){return("s");}
if(i==20){return("t");}
if(i==21){return("u");}
if(i==22){return("v");}
if(i==23){return("w");}
if(i==24){return("x");}
if(i==25){return("y");}
if(i==0){return("z");}
return("");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
39,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
42,
2,
13,
17,
30,
41,
13,
2,
2,
13,
17,
17,
0,
13,
18,
13,
13,
0,
13,
2,
2,
13,
17,
17,
41,
13,
2,
13,
17,
0,
13,
18,
13,
13,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
22,
24
],
[
22,
25
],
[
22,
26
],
[
22,
27
],
[
22,
28
],
[
22,
29
],
[
22,
30
],
[
22,
31
],
[
22,
32
],
[
22,
33
],
[
22,
34
],
[
22,
35
],
[
22,
36
],
[
22,
37
],
[
22,
38
],
[
22,
39
],
[
22,
40
],
[
22,
41
],
[
22,
42
],
[
22,
43
],
[
22,
44
],
[
22,
45
],
[
22,
46
],
[
22,
47
],
[
22,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
53,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
53,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
8,
83
],
[
83,
84
],
[
83,
85
],
[
8,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
]
| [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n String S = \"\";\n String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }\n long tmp2 = N-1L;\n // if(tmp2==-1L){\n // tmp2 = 25L;\n // }\n S+=A[(int)tmp2];\n StringBuffer str = new StringBuffer(S);\n String S2 = str.reverse().toString();\n System.out.println(S2);\n\n }\n}\n\n// 1000000000000001\n// 9223372036854775807",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n String S = \"\";\n String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }\n long tmp2 = N-1L;\n // if(tmp2==-1L){\n // tmp2 = 25L;\n // }\n S+=A[(int)tmp2];\n StringBuffer str = new StringBuffer(S);\n String S2 = str.reverse().toString();\n System.out.println(S2);\n\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n String S = \"\";\n String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }\n long tmp2 = N-1L;\n // if(tmp2==-1L){\n // tmp2 = 25L;\n // }\n S+=A[(int)tmp2];\n StringBuffer str = new StringBuffer(S);\n String S2 = str.reverse().toString();\n System.out.println(S2);\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n String S = \"\";\n String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }\n long tmp2 = N-1L;\n // if(tmp2==-1L){\n // tmp2 = 25L;\n // }\n S+=A[(int)tmp2];\n StringBuffer str = new StringBuffer(S);\n String S2 = str.reverse().toString();\n System.out.println(S2);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long N = sc.nextLong();",
"N",
"sc.nextLong()",
"sc.nextLong",
"sc",
"String S = \"\";",
"S",
"\"\"",
"String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};",
"A",
"{\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"}",
"\"a\"",
"\"b\"",
"\"c\"",
"\"d\"",
"\"e\"",
"\"f\"",
"\"g\"",
"\"h\"",
"\"i\"",
"\"j\"",
"\"k\"",
"\"l\"",
"\"m\"",
"\"n\"",
"\"o\"",
"\"p\"",
"\"q\"",
"\"r\"",
"\"s\"",
"\"t\"",
"\"u\"",
"\"v\"",
"\"w\"",
"\"x\"",
"\"y\"",
"\"z\"",
"while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }",
"N>26",
"N",
"26",
"{\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }",
"long tmp = (N-1L)%26;",
"tmp",
"(N-1L)%26",
"(N-1L)",
"N",
"1L",
"26",
"S+=A[(int)tmp]",
"S",
"A[(int)tmp]",
"A",
"(int)tmp",
"N = (N -1L) /26L",
"N",
"(N -1L) /26L",
"(N -1L)",
"N",
"1L",
"26L",
"long tmp2 = N-1L;",
"tmp2",
"N-1L",
"N",
"1L",
"S+=A[(int)tmp2]",
"S",
"A[(int)tmp2]",
"A",
"(int)tmp2",
"StringBuffer str = new StringBuffer(S);",
"str",
"new StringBuffer(S)",
"String S2 = str.reverse().toString();",
"S2",
"str.reverse().toString()",
"str.reverse().toString",
"str.reverse()",
"str.reverse",
"str",
"System.out.println(S2)",
"System.out.println",
"System.out",
"System",
"System.out",
"S2",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n String S = \"\";\n String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }\n long tmp2 = N-1L;\n // if(tmp2==-1L){\n // tmp2 = 25L;\n // }\n S+=A[(int)tmp2];\n StringBuffer str = new StringBuffer(S);\n String S2 = str.reverse().toString();\n System.out.println(S2);\n\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n String S = \"\";\n String A[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"};\n while(N>26){\n long tmp = (N-1L)%26;\n // if(tmp==-1L){\n // tmp = 25L;\n // }\n S+=A[(int)tmp];\n N = (N -1L) /26L ;\n // System.out.println(N);\n }\n long tmp2 = N-1L;\n // if(tmp2==-1L){\n // tmp2 = 25L;\n // }\n S+=A[(int)tmp2];\n StringBuffer str = new StringBuffer(S);\n String S2 = str.reverse().toString();\n System.out.println(S2);\n\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long N = sc.nextLong();
String S = "";
String A[] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
while(N>26){
long tmp = (N-1L)%26;
// if(tmp==-1L){
// tmp = 25L;
// }
S+=A[(int)tmp];
N = (N -1L) /26L ;
// System.out.println(N);
}
long tmp2 = N-1L;
// if(tmp2==-1L){
// tmp2 = 25L;
// }
S+=A[(int)tmp2];
StringBuffer str = new StringBuffer(S);
String S2 = str.reverse().toString();
System.out.println(S2);
}
}
// 1000000000000001
// 9223372036854775807 |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
13,
13,
12,
13,
30,
41,
13,
20,
42,
2,
17,
13,
30,
0,
13,
17,
41,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
81,
14
],
[
81,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
15,
24
],
[
24,
25
],
[
81,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
28,
37
],
[
37,
38
],
[
37,
39
],
[
81,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
50,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
62,
64
],
[
50,
65
],
[
65,
66
],
[
65,
67
],
[
42,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
40,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n }\n public void solve() {\n Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n long N = scan.nextLong();\n c(N);\n }\n public void c(long N) {\n StringBuilder sb = new StringBuilder();\n while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n }\n public void solve() {\n Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n long N = scan.nextLong();\n c(N);\n }\n public void c(long N) {\n StringBuilder sb = new StringBuilder();\n while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"Main",
"public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n }",
"main",
"{\n Main main = new Main();\n main.solve();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.solve()",
"main.solve",
"main",
"String[] args",
"args",
"public void solve() {\n Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n long N = scan.nextLong();\n c(N);\n }",
"solve",
"{\n Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n long N = scan.nextLong();\n c(N);\n }",
"Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));",
"scan",
"new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"long N = scan.nextLong();",
"N",
"scan.nextLong()",
"scan.nextLong",
"scan",
"c(N)",
"c",
"N",
"public void c(long N) {\n StringBuilder sb = new StringBuilder();\n while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }\n System.out.println(sb.reverse().toString());\n }",
"c",
"{\n StringBuilder sb = new StringBuilder();\n while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }\n System.out.println(sb.reverse().toString());\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }",
"0 < N",
"0",
"N",
"{\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }",
"N -= 1",
"N",
"1",
"int mod = (int) (N % 26);",
"mod",
"(int) (N % 26)",
"N",
"26",
"sb.append((char)(mod + (int)'a'))",
"sb.append",
"sb",
"(char)(mod + (int)'a')",
"mod",
"(int)'a'",
"N /= 26",
"N",
"26",
"System.out.println(sb.reverse().toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.reverse().toString()",
"sb.reverse().toString",
"sb.reverse()",
"sb.reverse",
"sb",
"long N",
"N",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n }\n public void solve() {\n Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n long N = scan.nextLong();\n c(N);\n }\n public void c(long N) {\n StringBuilder sb = new StringBuilder();\n while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.solve();\n }\n public void solve() {\n Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n long N = scan.nextLong();\n c(N);\n }\n public void c(long N) {\n StringBuilder sb = new StringBuilder();\n while(0 < N) {\n N -= 1;\n int mod = (int) (N % 26);\n sb.append((char)(mod + (int)'a'));\n N /= 26;\n }\n System.out.println(sb.reverse().toString());\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
}
public void solve() {
Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
long N = scan.nextLong();
c(N);
}
public void c(long N) {
StringBuilder sb = new StringBuilder();
while(0 < N) {
N -= 1;
int mod = (int) (N % 26);
sb.append((char)(mod + (int)'a'));
N /= 26;
}
System.out.println(sb.reverse().toString());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
41,
13,
17,
42,
2,
13,
17,
30,
0,
18,
13,
40,
13,
2,
2,
13,
17,
17,
40,
13,
0,
13,
17,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
17,
18,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
29,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
28,
39
],
[
39,
40
],
[
28,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
67,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n long N = scanner.nextLong();\n long[] num = new long[50];\n int k = 0;\n while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }\n String ans = \"\";\n for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }\n System.out.println(ans);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n long N = scanner.nextLong();\n long[] num = new long[50];\n int k = 0;\n while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }\n String ans = \"\";\n for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n long N = scanner.nextLong();\n long[] num = new long[50];\n int k = 0;\n while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }\n String ans = \"\";\n for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n long N = scanner.nextLong();\n long[] num = new long[50];\n int k = 0;\n while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }\n String ans = \"\";\n for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }\n System.out.println(ans);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"long N = scanner.nextLong();",
"N",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long[] num = new long[50];",
"num",
"new long[50]",
"50",
"int k = 0;",
"k",
"0",
"while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }",
"N > 0",
"N",
"0",
"{\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }",
"num[++k] = (N - 1) % 26",
"num[++k]",
"num",
"++k",
"k",
"(N - 1) % 26",
"(N - 1)",
"N",
"1",
"26",
"N--",
"N",
"N /= 26",
"N",
"26",
"String ans = \"\";",
"ans",
"\"\"",
"for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }",
"int i = k;",
"int i = k;",
"i",
"k",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n char c = (char) (97 + num[i]);\n ans += c;\n }",
"{\n char c = (char) (97 + num[i]);\n ans += c;\n }",
"char c = (char) (97 + num[i]);",
"c",
"(char) (97 + num[i])",
"97",
"num[i]",
"num",
"i",
"ans += c",
"ans",
"c",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n long N = scanner.nextLong();\n long[] num = new long[50];\n int k = 0;\n while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }\n String ans = \"\";\n for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n long N = scanner.nextLong();\n long[] num = new long[50];\n int k = 0;\n while(N > 0) {\n num[++k] = (N - 1) % 26;\n N--;\n N /= 26;\n }\n String ans = \"\";\n for (int i = k; i > 0; i--) {\n char c = (char) (97 + num[i]);\n ans += c;\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long N = scanner.nextLong();
long[] num = new long[50];
int k = 0;
while(N > 0) {
num[++k] = (N - 1) % 26;
N--;
N /= 26;
}
String ans = "";
for (int i = k; i > 0; i--) {
char c = (char) (97 + num[i]);
ans += c;
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
17,
41,
13,
17,
14,
2,
13,
17,
30,
41,
13,
2,
13,
17,
4,
18,
18,
13,
13,
18,
13,
13,
30,
41,
13,
17,
42,
2,
2,
13,
13,
17,
30,
41,
13,
2,
2,
13,
13,
17,
41,
13,
13,
0,
13,
2,
18,
13,
13,
13,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
4,
18,
18,
36,
13,
29,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
29,
4,
18,
13,
29,
4,
18,
13,
17,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
258,
8
],
[
258,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
28,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
56,
64
],
[
64,
65
],
[
64,
66
],
[
56,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
56,
74
],
[
74,
75
],
[
74,
76
],
[
56,
77
],
[
77,
78
],
[
77,
79
],
[
46,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
9,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
96,
105
],
[
105,
106
],
[
88,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
109,
115
],
[
88,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
119,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
129,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
118,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
88,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
146,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
156,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
145,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
168,
171
],
[
88,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
179,
180
],
[
88,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
88,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
194,
197
],
[
197,
198
],
[
88,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
206,
211
],
[
211,
212
],
[
211,
213
],
[
206,
214
],
[
214,
215
],
[
215,
216
],
[
206,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
222,
223
],
[
201,
224
],
[
224,
225
],
[
199,
226
],
[
226,
227
],
[
88,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
235,
240
],
[
240,
241
],
[
240,
242
],
[
235,
243
],
[
243,
244
],
[
244,
245
],
[
235,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
247,
251
],
[
251,
252
],
[
230,
253
],
[
253,
254
],
[
228,
255
],
[
255,
256
],
[
0,
257
],
[
257,
258
],
[
257,
259
]
]
| [
"import java.util.*;\nimport java.io.*;\n \npublic class Main {\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n //long n = 1000000000000001L;\n long n = sc.nextLong();\n char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();\n String ans = \"\";\n if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }\n }\n}\n\nclass FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n \n public void close() throws Exception{\n this.reader.close();\n return;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n } \n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n //long n = 1000000000000001L;\n long n = sc.nextLong();\n char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();\n String ans = \"\";\n if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n //long n = 1000000000000001L;\n long n = sc.nextLong();\n char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();\n String ans = \"\";\n if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }\n }",
"main",
"{\n FastScanner sc = new FastScanner(System.in);\n //long n = 1000000000000001L;\n long n = sc.nextLong();\n char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();\n String ans = \"\";\n if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }\n }",
"FastScanner sc = new FastScanner(System.in);",
"sc",
"new FastScanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();",
"alp",
"\"zabcdefghijklmnopqrstuvwxy\".toCharArray()",
"\"zabcdefghijklmnopqrstuvwxy\".toCharArray",
"\"zabcdefghijklmnopqrstuvwxy\"",
"String ans = \"\";",
"ans",
"\"\"",
"if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }",
"n <= 26",
"n",
"26",
"{\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }",
"int index = (int)(n%26);",
"index",
"(int)(n%26)",
"n",
"26",
"System.out.println(alp[index])",
"System.out.println",
"System.out",
"System",
"System.out",
"alp[index]",
"alp",
"index",
"{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }",
"long pow = 1;",
"pow",
"1",
"while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }",
"n / pow > 0",
"n / pow",
"n",
"pow",
"0",
"{\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }",
"long i = (n/pow)%26;",
"i",
"(n/pow)%26",
"(n/pow)",
"n",
"pow",
"26",
"int index = (int)i;",
"index",
"(int)i",
"ans = alp[index] + ans",
"ans",
"alp[index] + ans",
"alp[index]",
"alp",
"index",
"ans",
"n -= pow",
"n",
"pow",
"pow *= 26L",
"pow",
"26L",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n \n public void close() throws Exception{\n this.reader.close();\n return;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n } \n}",
"FastScanner",
"private BufferedReader reader = null;",
"reader",
"null",
"private StringTokenizer tokenizer = null;",
"tokenizer",
"null",
"public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }",
"FastScanner",
"{\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(in))",
"reader",
"new BufferedReader(new InputStreamReader(in))",
"tokenizer = null",
"tokenizer",
"null",
"InputStream in",
"in",
"public void close() throws Exception{\n this.reader.close();\n return;\n }",
"close",
"{\n this.reader.close();\n return;\n }",
"this.reader.close()",
"this.reader.close",
"this.reader",
"this",
"this.reader",
"return;",
"public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken(\"\\n\");\n }",
"nextLine",
"{\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken(\"\\n\");\n }",
"if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n return reader.readLine();\n }",
"return reader.readLine();",
"reader.readLine()",
"reader.readLine",
"reader",
"return tokenizer.nextToken(\"\\n\");",
"tokenizer.nextToken(\"\\n\")",
"tokenizer.nextToken",
"tokenizer",
"\"\\n\"",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"nextIntArray",
"{\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"nextLongArray",
"{\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextLong();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextLong();",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public class Main {\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n //long n = 1000000000000001L;\n long n = sc.nextLong();\n char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();\n String ans = \"\";\n if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n //long n = 1000000000000001L;\n long n = sc.nextLong();\n char[] alp = \"zabcdefghijklmnopqrstuvwxy\".toCharArray();\n String ans = \"\";\n if(n <= 26){\n int index = (int)(n%26);\n System.out.println(alp[index]);\n }else{\n long pow = 1;\n while(n / pow > 0){\n long i = (n/pow)%26;\n int index = (int)i;\n ans = alp[index] + ans;\n n -= pow;\n pow *= 26L;\n }\n System.out.println(ans);\n }\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
FastScanner sc = new FastScanner(System.in);
//long n = 1000000000000001L;
long n = sc.nextLong();
char[] alp = "zabcdefghijklmnopqrstuvwxy".toCharArray();
String ans = "";
if(n <= 26){
int index = (int)(n%26);
System.out.println(alp[index]);
}else{
long pow = 1;
while(n / pow > 0){
long i = (n/pow)%26;
int index = (int)i;
ans = alp[index] + ans;
n -= pow;
pow *= 26L;
}
System.out.println(ans);
}
}
}
class FastScanner {
private BufferedReader reader = null;
private StringTokenizer tokenizer = null;
public FastScanner(InputStream in) {
reader = new BufferedReader(new InputStreamReader(in));
tokenizer = null;
}
public void close() throws Exception{
this.reader.close();
return;
}
public String next() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public String nextLine() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
return reader.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken("\n");
}
public long nextLong() {
return Long.parseLong(next());
}
public int nextInt() {
return Integer.parseInt(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nextLong();
return a;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
4,
13,
2,
13,
17,
0,
13,
2,
13,
2,
13,
17,
0,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
70,
5
],
[
70,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
6,
44
],
[
44,
45
],
[
70,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
48,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
46,
67
],
[
67,
68
],
[
0,
69
],
[
69,
70
],
[
69,
71
]
]
| [
"import java.util.*;\n\npublic class Main {\n\t \n\t public static String getKey(Long index){\n\t\tString colCode = \"\";\n\t\tchar key='a';\n\t\tLong loop = index / 26;\n\t\tif(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}\n\t\tkey = (char) (key+index%26);\n\t\tcolCode += key;\n\t\treturn colCode;\n\t}\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t Long n = sc.nextLong();\n\t System.out.println(getKey(n-1)); \n\t\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t \n\t public static String getKey(Long index){\n\t\tString colCode = \"\";\n\t\tchar key='a';\n\t\tLong loop = index / 26;\n\t\tif(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}\n\t\tkey = (char) (key+index%26);\n\t\tcolCode += key;\n\t\treturn colCode;\n\t}\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t Long n = sc.nextLong();\n\t System.out.println(getKey(n-1)); \n\t\t}\n}",
"Main",
"public static String getKey(Long index){\n\t\tString colCode = \"\";\n\t\tchar key='a';\n\t\tLong loop = index / 26;\n\t\tif(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}\n\t\tkey = (char) (key+index%26);\n\t\tcolCode += key;\n\t\treturn colCode;\n\t}",
"getKey",
"{\n\t\tString colCode = \"\";\n\t\tchar key='a';\n\t\tLong loop = index / 26;\n\t\tif(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}\n\t\tkey = (char) (key+index%26);\n\t\tcolCode += key;\n\t\treturn colCode;\n\t}",
"String colCode = \"\";",
"colCode",
"\"\"",
"char key='a';",
"key",
"'a'",
"Long loop = index / 26;",
"loop",
"index / 26",
"index",
"26",
"if(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}",
"loop>0",
"loop",
"0",
"{\n\t\t\tcolCode += getKey(loop-1);\n\t\t}",
"colCode += getKey(loop-1)",
"colCode",
"getKey(loop-1)",
"getKey",
"loop-1",
"loop",
"1",
"key = (char) (key+index%26)",
"key",
"(char) (key+index%26)",
"key",
"index%26",
"index",
"26",
"colCode += key",
"colCode",
"key",
"return colCode;",
"colCode",
"Long index",
"index",
"public static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t Long n = sc.nextLong();\n\t System.out.println(getKey(n-1)); \n\t\t}",
"main",
"{\n\t Scanner sc = new Scanner(System.in);\n\t Long n = sc.nextLong();\n\t System.out.println(getKey(n-1)); \n\t\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"System.out.println(getKey(n-1))",
"System.out.println",
"System.out",
"System",
"System.out",
"getKey(n-1)",
"getKey",
"n-1",
"n",
"1",
"String[] args",
"args",
"public class Main {\n\t \n\t public static String getKey(Long index){\n\t\tString colCode = \"\";\n\t\tchar key='a';\n\t\tLong loop = index / 26;\n\t\tif(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}\n\t\tkey = (char) (key+index%26);\n\t\tcolCode += key;\n\t\treturn colCode;\n\t}\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t Long n = sc.nextLong();\n\t System.out.println(getKey(n-1)); \n\t\t}\n}",
"public class Main {\n\t \n\t public static String getKey(Long index){\n\t\tString colCode = \"\";\n\t\tchar key='a';\n\t\tLong loop = index / 26;\n\t\tif(loop>0){\n\t\t\tcolCode += getKey(loop-1);\n\t\t}\n\t\tkey = (char) (key+index%26);\n\t\tcolCode += key;\n\t\treturn colCode;\n\t}\n\n\t\tpublic static void main(String[] args) {\n\t Scanner sc = new Scanner(System.in);\n\t Long n = sc.nextLong();\n\t System.out.println(getKey(n-1)); \n\t\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static String getKey(Long index){
String colCode = "";
char key='a';
Long loop = index / 26;
if(loop>0){
colCode += getKey(loop-1);
}
key = (char) (key+index%26);
colCode += key;
return colCode;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Long n = sc.nextLong();
System.out.println(getKey(n-1));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
42,
2,
13,
17,
30,
40,
13,
4,
18,
13,
2,
2,
13,
17,
17,
0,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
49,
5
],
[
49,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
24,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
44,
45
],
[
6,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
]
| [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n StringBuilder ans = new StringBuilder();\n while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }\n System.out.println(ans.reverse());\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n StringBuilder ans = new StringBuilder();\n while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }\n System.out.println(ans.reverse());\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n StringBuilder ans = new StringBuilder();\n while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }\n System.out.println(ans.reverse());\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n StringBuilder ans = new StringBuilder();\n while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }\n System.out.println(ans.reverse());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long N = sc.nextLong();",
"N",
"sc.nextLong()",
"sc.nextLong",
"sc",
"StringBuilder ans = new StringBuilder();",
"ans",
"new StringBuilder()",
"while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }",
"N > 0",
"N",
"0",
"{\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }",
"N--",
"N",
"ans.append((char) (N % 26 + 'a'))",
"ans.append",
"ans",
"(char) (N % 26 + 'a')",
"N % 26",
"N",
"26",
"'a'",
"N /= 26",
"N",
"26",
"System.out.println(ans.reverse())",
"System.out.println",
"System.out",
"System",
"System.out",
"ans.reverse()",
"ans.reverse",
"ans",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n StringBuilder ans = new StringBuilder();\n while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }\n System.out.println(ans.reverse());\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long N = sc.nextLong();\n StringBuilder ans = new StringBuilder();\n while(N > 0){\n N--;\n ans.append((char) (N % 26 + 'a'));\n N /= 26;\n }\n System.out.println(ans.reverse());\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long N = sc.nextLong();
StringBuilder ans = new StringBuilder();
while(N > 0){
N--;
ans.append((char) (N % 26 + 'a'));
N /= 26;
}
System.out.println(ans.reverse());
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
17,
4,
18,
13,
13,
40,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
14,
2,
18,
13,
13,
17,
0,
18,
13,
13,
17,
0,
13,
2,
2,
13,
18,
13,
13,
17,
14,
2,
13,
17,
30,
3,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
40,
17,
9,
4,
18,
18,
13,
13,
2,
2,
17,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
10,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
10,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
31,
33
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
35,
39
],
[
39,
40
],
[
25,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
61,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
53,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
53,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
25,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
100,
107
],
[
99,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
25,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
]
]
| [
"import org.w3c.dom.ls.LSOutput;\n\nimport java.util.*;\n\nimport static java.lang.Math.*;\n\nclass Main {\n final Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n private void run() {\n long n = sc.nextLong();\n int[] m = new int[100];\n Arrays.fill(m, -1);\n\n for (int i = 1; i < 100; i++) {\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }\n\n for (int i = 99; i > 0; i--) {\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }\n System.out.println(\"\");\n }\n}",
"import org.w3c.dom.ls.LSOutput;",
"LSOutput",
"org.w3c.dom.ls",
"import java.util.*;",
"util.*",
"java",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"class Main {\n final Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n private void run() {\n long n = sc.nextLong();\n int[] m = new int[100];\n Arrays.fill(m, -1);\n\n for (int i = 1; i < 100; i++) {\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }\n\n for (int i = 99; i > 0; i--) {\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }\n System.out.println(\"\");\n }\n}",
"Main",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"private void run() {\n long n = sc.nextLong();\n int[] m = new int[100];\n Arrays.fill(m, -1);\n\n for (int i = 1; i < 100; i++) {\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }\n\n for (int i = 99; i > 0; i--) {\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }\n System.out.println(\"\");\n }",
"run",
"{\n long n = sc.nextLong();\n int[] m = new int[100];\n Arrays.fill(m, -1);\n\n for (int i = 1; i < 100; i++) {\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }\n\n for (int i = 99; i > 0; i--) {\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }\n System.out.println(\"\");\n }",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"int[] m = new int[100];",
"m",
"new int[100]",
"100",
"Arrays.fill(m, -1)",
"Arrays.fill",
"Arrays",
"m",
"-1",
"1",
"for (int i = 1; i < 100; i++) {\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < 100",
"i",
"100",
"i++",
"i++",
"i",
"{\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }",
"{\n m[i] = (int) (n % 26);\n if (m[i] == 0)\n m[i] = 26;\n n = (n - m[i]) / 26;\n if (n == 0) {\n break;\n }\n }",
"m[i] = (int) (n % 26)",
"m[i]",
"m",
"i",
"(int) (n % 26)",
"n",
"26",
"if (m[i] == 0)\n m[i] = 26;",
"m[i] == 0",
"m[i]",
"m",
"i",
"0",
"m[i] = 26",
"m[i]",
"m",
"i",
"26",
"n = (n - m[i]) / 26",
"n",
"(n - m[i]) / 26",
"(n - m[i])",
"n",
"m[i]",
"m",
"i",
"26",
"if (n == 0) {\n break;\n }",
"n == 0",
"n",
"0",
"{\n break;\n }",
"break;",
"for (int i = 99; i > 0; i--) {\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }",
"int i = 99;",
"int i = 99;",
"i",
"99",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }",
"{\n if (m[i] == -1)\n continue;\n System.out.print((char) ('a' + m[i] - 1));\n }",
"if (m[i] == -1)\n continue;",
"m[i] == -1",
"m[i]",
"m",
"i",
"-1",
"1",
"continue;",
"System.out.print((char) ('a' + m[i] - 1))",
"System.out.print",
"System.out",
"System",
"System.out",
"(char) ('a' + m[i] - 1)",
"'a' + m[i]",
"'a'",
"m[i]",
"m",
"i",
"1",
"System.out.println(\"\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"\""
]
| import org.w3c.dom.ls.LSOutput;
import java.util.*;
import static java.lang.Math.*;
class Main {
final Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main().run();
}
private void run() {
long n = sc.nextLong();
int[] m = new int[100];
Arrays.fill(m, -1);
for (int i = 1; i < 100; i++) {
m[i] = (int) (n % 26);
if (m[i] == 0)
m[i] = 26;
n = (n - m[i]) / 26;
if (n == 0) {
break;
}
}
for (int i = 99; i > 0; i--) {
if (m[i] == -1)
continue;
System.out.print((char) ('a' + m[i] - 1));
}
System.out.println("");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
17,
30,
41,
13,
14,
2,
2,
13,
17,
17,
30,
0,
13,
17,
0,
13,
2,
2,
13,
17,
17,
30,
0,
13,
2,
2,
13,
17,
17,
0,
13,
17,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
30,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
47,
55
],
[
55,
56
],
[
55,
57
],
[
27,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
6,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
]
| [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tLong n = Long.parseLong(sc.next());\n\n\n\t\tString ans = \"\";\n\t\twhile(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}\n\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tLong n = Long.parseLong(sc.next());\n\n\n\t\tString ans = \"\";\n\t\twhile(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tLong n = Long.parseLong(sc.next());\n\n\n\t\tString ans = \"\";\n\t\twhile(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tLong n = Long.parseLong(sc.next());\n\n\n\t\tString ans = \"\";\n\t\twhile(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Long n = Long.parseLong(sc.next());",
"n",
"Long.parseLong(sc.next())",
"Long.parseLong",
"Long",
"sc.next()",
"sc.next",
"sc",
"String ans = \"\";",
"ans",
"\"\"",
"while(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}",
"n != 0",
"n",
"0",
"{\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}",
"char tmp;",
"tmp",
"if(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}",
"n%26 == 0",
"n%26",
"n",
"26",
"0",
"{\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}",
"tmp = 'z'",
"tmp",
"'z'",
"n = n/26 -1",
"n",
"n/26 -1",
"n/26",
"n",
"26",
"1",
"{\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}",
"tmp = (char) (n%26 +96)",
"tmp",
"(char) (n%26 +96)",
"n%26",
"n",
"26",
"96",
"n /= 26",
"n",
"26",
"ans = tmp + ans",
"ans",
"tmp + ans",
"tmp",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tLong n = Long.parseLong(sc.next());\n\n\n\t\tString ans = \"\";\n\t\twhile(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tLong n = Long.parseLong(sc.next());\n\n\n\t\tString ans = \"\";\n\t\twhile(n != 0) {\n\t\t\tchar tmp;\n\t\t\tif(n%26 == 0) {\n\t\t\t\ttmp = 'z';\n\t\t\t\tn = n/26 -1;\n\t\t\t}else {\n\t\t\t\ttmp = (char) (n%26 +96);\n\t\t\t\tn /= 26;\n\n\t\t\t}\n\n\t\t\tans = tmp + ans;\n\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Long n = Long.parseLong(sc.next());
String ans = "";
while(n != 0) {
char tmp;
if(n%26 == 0) {
tmp = 'z';
n = n/26 -1;
}else {
tmp = (char) (n%26 +96);
n /= 26;
}
ans = tmp + ans;
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
42,
2,
13,
17,
30,
41,
13,
2,
13,
17,
0,
13,
17,
41,
13,
8,
2,
13,
17,
17,
2,
13,
17,
14,
2,
13,
17,
40,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
78,
8
],
[
78,
9
],
[
9,
10
],
[
9,
11
],
[
78,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
12,
18
],
[
18,
19
],
[
78,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
22,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
35,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
35,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
35,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
22,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
22,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
]
| [
"import java.math.BigDecimal;\nimport java.util.*;\n\npublic class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n long n = sc.nextLong();\n\n StringBuilder sb = new StringBuilder();\n\n while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }\n\n sb = sb.reverse();\n\n System.out.print(sb.toString());\n\n }\n}",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n long n = sc.nextLong();\n\n StringBuilder sb = new StringBuilder();\n\n while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }\n\n sb = sb.reverse();\n\n System.out.print(sb.toString());\n\n }\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"void run() {\n\n long n = sc.nextLong();\n\n StringBuilder sb = new StringBuilder();\n\n while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }\n\n sb = sb.reverse();\n\n System.out.print(sb.toString());\n\n }",
"run",
"{\n\n long n = sc.nextLong();\n\n StringBuilder sb = new StringBuilder();\n\n while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }\n\n sb = sb.reverse();\n\n System.out.print(sb.toString());\n\n }",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }",
"n != 0",
"n",
"0",
"{\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }",
"long remain = n % 26;",
"remain",
"n % 26",
"n",
"26",
"n /= 26",
"n",
"26",
"char c = remain==0 ? 'z' : (char)(remain+96);",
"c",
"remain==0 ? 'z' : (char)(remain+96)",
"remain==0",
"remain",
"0",
"'z'",
"(char)(remain+96)",
"remain",
"96",
"if (remain==0) n--;",
"remain==0",
"remain",
"0",
"n--",
"n",
"sb.append(c)",
"sb.append",
"sb",
"c",
"sb = sb.reverse()",
"sb",
"sb.reverse()",
"sb.reverse",
"sb",
"System.out.print(sb.toString())",
"System.out.print",
"System.out",
"System",
"System.out",
"sb.toString()",
"sb.toString",
"sb",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n long n = sc.nextLong();\n\n StringBuilder sb = new StringBuilder();\n\n while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }\n\n sb = sb.reverse();\n\n System.out.print(sb.toString());\n\n }\n}",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n long n = sc.nextLong();\n\n StringBuilder sb = new StringBuilder();\n\n while (n != 0) {\n long remain = n % 26;\n n /= 26;\n char c = remain==0 ? 'z' : (char)(remain+96);\n if (remain==0) n--;\n sb.append(c);\n }\n\n sb = sb.reverse();\n\n System.out.print(sb.toString());\n\n }\n}",
"Main"
]
| import java.math.BigDecimal;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main().run();
}
void run() {
long n = sc.nextLong();
StringBuilder sb = new StringBuilder();
while (n != 0) {
long remain = n % 26;
n /= 26;
char c = remain==0 ? 'z' : (char)(remain+96);
if (remain==0) n--;
sb.append(c);
}
sb = sb.reverse();
System.out.print(sb.toString());
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.