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,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
20,
41,
13,
20,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
4,
18,
13,
13,
4,
18,
13,
17,
4,
18,
13,
13,
28,
13,
13,
30,
30,
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
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
25,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
25,
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
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
57,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
57,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
57,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
77,
81
],
[
57,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
57,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
25,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
11,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
9,
109
],
[
109,
110
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tArrayList<String> dis = new ArrayList<String>();\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\tfor(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\tdis.add(str);\n\t\t}\n\t\tfor(String s : dis){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tArrayList<String> dis = new ArrayList<String>();\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\tfor(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\tdis.add(str);\n\t\t}\n\t\tfor(String s : dis){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tArrayList<String> dis = new ArrayList<String>();\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\tfor(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\tdis.add(str);\n\t\t}\n\t\tfor(String s : dis){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tArrayList<String> dis = new ArrayList<String>();\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\tfor(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\tdis.add(str);\n\t\t}\n\t\tfor(String s : dis){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"ArrayList<String> dis = new ArrayList<String>();",
"dis",
"new ArrayList<String>()",
"while(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\tfor(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\tdis.add(str);\n\t\t}",
"true",
"{\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\tfor(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}\n\t\t\tdis.add(str);\n\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"if(str.equals(\"-\")) break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int h = Integer.parseInt(br.readLine());",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i=0 ;i<h ;i++){\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i<h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}",
"{\n\t\t\t\tint c = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(str);\n\t\t\t\tstr = sb.substring(0,c);\n\t\t\t\tsb.delete(0,c);\n\t\t\t\tstr = sb.append(str).toString();\n\t\t\t\tsb.setLength(0);\n\t\t\t}",
"int c = Integer.parseInt(br.readLine());",
"c",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"sb.append(str)",
"sb.append",
"sb",
"str",
"str = sb.substring(0,c)",
"str",
"sb.substring(0,c)",
"sb.substring",
"sb",
"0",
"c",
"sb.delete(0,c)",
"sb.delete",
"sb",
"0",
"c",
"str = sb.append(str).toString()",
"str",
"sb.append(str).toString()",
"sb.append(str).toString",
"sb.append(str)",
"sb.append",
"sb",
"str",
"sb.setLength(0)",
"sb.setLength",
"sb",
"0",
"dis.add(str)",
"dis.add",
"dis",
"str",
"for(String s : dis){\n\t\t\tSystem.out.println(s);\n\t\t}",
"String s",
"dis",
"{\n\t\t\tSystem.out.println(s);\n\t\t}",
"{\n\t\t\tSystem.out.println(s);\n\t\t}",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args"
]
| import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
StringBuilder sb = new StringBuilder();
ArrayList<String> dis = new ArrayList<String>();
while(true){
str = br.readLine();
if(str.equals("-")) break;
int h = Integer.parseInt(br.readLine());
for(int i=0 ;i<h ;i++){
int c = Integer.parseInt(br.readLine());
sb.append(str);
str = sb.substring(0,c);
sb.delete(0,c);
str = sb.append(str).toString();
sb.setLength(0);
}
dis.add(str);
}
for(String s : dis){
System.out.println(s);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
17,
30,
41,
13,
20,
14,
4,
18,
4,
18,
13,
17,
30,
3,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
76,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
19,
24
],
[
18,
25
],
[
25,
26
],
[
18,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
53,
57
],
[
45,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
45,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
27,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
9,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\twhile (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\twhile (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}\n\t}",
"while (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}",
"StringBuilder sb = new StringBuilder(sc.next());",
"sb",
"new StringBuilder(sc.next())",
"if (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}",
"sb.toString().equals(\"-\")",
"sb.toString().equals",
"sb.toString()",
"sb.toString",
"sb",
"\"-\"",
"{break;}",
"break;",
"{\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}",
"{\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String s = sb.substring(0,a);",
"s",
"sb.substring(0,a)",
"sb.substring",
"sb",
"0",
"a",
"sb.delete(0,a)",
"sb.delete",
"sb",
"0",
"a",
"sb.append(s)",
"sb.append",
"sb",
"s",
"System.out.println(sb)",
"System.out.println",
"System.out",
"System",
"System.out",
"sb",
"String[] args",
"args",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (true) {\n\t\t\tStringBuilder sb = new StringBuilder(sc.next());\n\t\t\tif (sb.toString().equals(\"-\")) {break;}\n\t\t\telse {\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor (int i=0; i<n; i++) {\n\t\t\t\t\tint a = sc.nextInt();\n\t\t\t\t\tString s = sb.substring(0,a);\n\t\t\t\t\tsb.delete(0,a);\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(sb);\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (true) {
StringBuilder sb = new StringBuilder(sc.next());
if (sb.toString().equals("-")) {break;}
else {
int n = sc.nextInt();
for (int i=0; i<n; i++) {
int a = sc.nextInt();
String s = sb.substring(0,a);
sb.delete(0,a);
sb.append(s);
}
System.out.println(sb);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
17,
13,
30,
3,
41,
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,
41,
13,
2,
13,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
41,
13,
4,
18,
2,
13,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
14,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
14,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
14,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
14,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
69,
75
],
[
14,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
14,
82
],
[
82,
83
],
[
83,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }\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 while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }",
"true",
"{\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }",
"String str = sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (\"-\".equals(str)) {\n break;\n }",
"\"-\".equals(str)",
"\"-\".equals",
"\"-\"",
"str",
"{\n break;\n }",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n sum += sc.nextInt();\n }",
"{\n sum += sc.nextInt();\n }",
"sum += sc.nextInt()",
"sum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int bi = sum % str.length();",
"bi",
"sum % str.length()",
"sum",
"str.length()",
"str.length",
"str",
"int ei = bi + str.length();",
"ei",
"bi + str.length()",
"bi",
"str.length()",
"str.length",
"str",
"String res = (str + str).substring(bi, ei);",
"res",
"(str + str).substring(bi, ei)",
"(str + str).substring",
"(str + str)",
"str",
"str",
"bi",
"ei",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n String str = sc.nextLine();\n if (\"-\".equals(str)) {\n break;\n }\n int m = sc.nextInt();\n int sum = 0;\n for (int i = 0; i < m; i++) {\n sum += sc.nextInt();\n }\n int bi = sum % str.length();\n int ei = bi + str.length();\n String res = (str + str).substring(bi, ei);\n System.out.println(res);\n sc.nextLine();\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String str = sc.nextLine();
if ("-".equals(str)) {
break;
}
int m = sc.nextInt();
int sum = 0;
for (int i = 0; i < m; i++) {
sum += sc.nextInt();
}
int bi = sum % str.length();
int ei = bi + str.length();
String res = (str + str).substring(bi, ei);
System.out.println(res);
sc.nextLine();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
20,
14,
4,
18,
4,
18,
13,
17,
17,
30,
3,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
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
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
19,
25
],
[
18,
26
],
[
26,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
28,
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
46,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
46,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}\n\n\n\n\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}\n\n\n\n\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}\n\n\n\n\n\n\t}",
"main",
"{\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}\n\n\n\n\n\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"while(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}",
"true",
"{\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}",
"StringBuilder str = new StringBuilder(in.next());",
"str",
"new StringBuilder(in.next())",
"if(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}",
"str.substring(0).equals(\"-\")",
"str.substring(0).equals",
"str.substring(0)",
"str.substring",
"str",
"0",
"\"-\"",
"{\n\n\t\t\t\tbreak;\n\n\t\t\t}",
"break;",
"{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}",
"int shuffle_num = in.nextInt();",
"shuffle_num",
"in.nextInt()",
"in.nextInt",
"in",
"for(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < shuffle_num",
"i",
"shuffle_num",
"i++",
"i++",
"i",
"{\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}",
"{\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}",
"int card_num = in.nextInt();",
"card_num",
"in.nextInt()",
"in.nextInt",
"in",
"String shuffle_word = str.substring(0, card_num);",
"shuffle_word",
"str.substring(0, card_num)",
"str.substring",
"str",
"0",
"card_num",
"str.delete(0, card_num)",
"str.delete",
"str",
"0",
"card_num",
"str.append(shuffle_word)",
"str.append",
"str",
"shuffle_word",
"System.out.println(str.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"str.toString()",
"str.toString",
"str",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}\n\n\n\n\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tStringBuilder str = new StringBuilder(in.next());\n\n\t\t\tif(str.substring(0).equals(\"-\")){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\tint shuffle_num = in.nextInt();\n\n\t\t\t\tfor(int i = 0; i < shuffle_num; i++){\n\n\t\t\t\t\tint card_num = in.nextInt();\n\n\t\t\t\t\tString shuffle_word = str.substring(0, card_num);\n\n\t\t\t\t\tstr.delete(0, card_num);\n\n\t\t\t\t\tstr.append(shuffle_word);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str.toString());\n\n\n\n\t\t}\n\n\n\n\n\n\t}\n\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while(true){
StringBuilder str = new StringBuilder(in.next());
if(str.substring(0).equals("-")){
break;
}else{
int shuffle_num = in.nextInt();
for(int i = 0; i < shuffle_num; i++){
int card_num = in.nextInt();
String shuffle_word = str.substring(0, card_num);
str.delete(0, card_num);
str.append(shuffle_word);
}
}
System.out.println(str.toString());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
0,
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
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
17,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
17,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
17,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
17,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
6,
79
],
[
79,
80
]
]
| [
"import java.util.Scanner;\nclass Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while(true) {\n String str = scan.nextLine();\n if (str.equals(\"-\")) {\n break;\n }\n int a = scan.nextInt();\n for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }\n System.out.println(str);\n str = scan.nextLine();\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while(true) {\n String str = scan.nextLine();\n if (str.equals(\"-\")) {\n break;\n }\n int a = scan.nextInt();\n for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }\n System.out.println(str);\n str = scan.nextLine();\n }\n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while(true) {\n String str = scan.nextLine();\n if (str.equals(\"-\")) {\n break;\n }\n int a = scan.nextInt();\n for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }\n System.out.println(str);\n str = scan.nextLine();\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while(true) {\n String str = scan.nextLine();\n if (str.equals(\"-\")) {\n break;\n }\n int a = scan.nextInt();\n for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }\n System.out.println(str);\n str = scan.nextLine();\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while(true) {\n String str = scan.nextLine();\n if (str.equals(\"-\")) {\n break;\n }\n int a = scan.nextInt();\n for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }\n System.out.println(str);\n str = scan.nextLine();\n }",
"true",
"{\n String str = scan.nextLine();\n if (str.equals(\"-\")) {\n break;\n }\n int a = scan.nextInt();\n for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }\n System.out.println(str);\n str = scan.nextLine();\n }",
"String str = scan.nextLine();",
"str",
"scan.nextLine()",
"scan.nextLine",
"scan",
"if (str.equals(\"-\")) {\n break;\n }",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n break;\n }",
"break;",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int i = 0;i < a; i++) {\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a",
"i",
"a",
"i++",
"i++",
"i",
"{\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }",
"{\n int h = scan.nextInt();\n str = str.substring(h,str.length()) + str.substring(0, h);\n }",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"str = str.substring(h,str.length()) + str.substring(0, h)",
"str",
"str.substring(h,str.length()) + str.substring(0, h)",
"str.substring(h,str.length())",
"str.substring",
"str",
"h",
"str.length()",
"str.length",
"str",
"str.substring(0, h)",
"str.substring",
"str",
"0",
"h",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"str = scan.nextLine()",
"str",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String args[]",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
while(true) {
String str = scan.nextLine();
if (str.equals("-")) {
break;
}
int a = scan.nextInt();
for (int i = 0;i < a; i++) {
int h = scan.nextInt();
str = str.substring(h,str.length()) + str.substring(0, h);
}
System.out.println(str);
str = scan.nextLine();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
18,
13,
13,
41,
13,
20,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
11,
1,
0,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
198,
5
],
[
198,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
37,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
26,
48
],
[
48,
49
],
[
48,
50
],
[
26,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
26,
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
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
69,
78
],
[
78,
79
],
[
78,
80
],
[
69,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
69,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
102,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
69,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
124,
135
],
[
136,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
141,
143
],
[
136,
144
],
[
144,
145
],
[
69,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
151,
153
],
[
146,
154
],
[
154,
155
],
[
155,
156
],
[
146,
157
],
[
158,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
163,
165
],
[
26,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
166,
171
],
[
171,
172
],
[
171,
173
],
[
166,
174
],
[
174,
175
],
[
175,
176
],
[
166,
177
],
[
178,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
179,
184
],
[
184,
185
],
[
184,
186
],
[
26,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
8,
192
],
[
192,
193
],
[
193,
194
],
[
6,
195
],
[
195,
196
],
[
0,
197
],
[
197,
198
],
[
197,
199
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int i, j, k, n, m, l;\n while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int i, j, k, n, m, l;\n while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int i, j, k, n, m, l;\n while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int i, j, k, n, m, l;\n while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int i",
"i",
"j",
"j",
"k",
"k",
"n",
"n",
"m",
"m",
"l;",
"l",
"while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }",
"true",
"{\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }",
"String d = sc.next();",
"d",
"sc.next()",
"sc.next",
"sc",
"char[] a = d.toCharArray();",
"a",
"d.toCharArray()",
"d.toCharArray",
"d",
"if(d.equals(\"-\"))break;",
"d.equals(\"-\")",
"d.equals",
"d",
"\"-\"",
"break;",
"n = a.length",
"n",
"a.length",
"a",
"a.length",
"char[] c = new char[n];",
"c",
"new char[n]",
"n",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }",
"i = 0;",
"i = 0",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }",
"{\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }",
"k = 0",
"k",
"0",
"l = sc.nextInt()",
"l",
"sc.nextInt()",
"sc.nextInt",
"sc",
"char[] b = new char[l];",
"b",
"new char[l]",
"l",
"for(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }",
"j = 0;",
"j = 0",
"j",
"0",
"j < l",
"j",
"l",
"j++",
"j++",
"j",
"{\n\t\t \tb[j] = a[j];\n\t\t }",
"{\n\t\t \tb[j] = a[j];\n\t\t }",
"b[j] = a[j]",
"b[j]",
"b",
"j",
"a[j]",
"a",
"j",
"for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }",
"j = l;",
"j = l",
"j",
"l",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }",
"{\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }",
"c[k] = a[j]",
"c[k]",
"c",
"k",
"a[j]",
"a",
"j",
"k++",
"k",
"for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }",
"j = 0;",
"j = 0",
"j",
"0",
"j < l",
"j",
"l",
"j++",
"j++",
"j",
"{\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }",
"{\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }",
"c[k] = b[j]",
"c[k]",
"c",
"k",
"b[j]",
"b",
"j",
"k++",
"k",
"for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }",
"j = 0;",
"j = 0",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t \ta[j] = c[j];\n\t\t }",
"{\n\t\t \ta[j] = c[j];\n\t\t }",
"a[j] = c[j]",
"a[j]",
"a",
"j",
"c[j]",
"c",
"j",
"for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t \tSystem.out.print(a[i]);\n\t }",
"{\n\t \tSystem.out.print(a[i]);\n\t }",
"System.out.print(a[i])",
"System.out.print",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int i, j, k, n, m, l;\n while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }\n sc.close();\n }\n}",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int i, j, k, n, m, l;\n while(true) {\n \tString d = sc.next();\n\t char[] a = d.toCharArray();\n\t if(d.equals(\"-\"))break;\n\t n = a.length;\n\t char[] c = new char[n];\n\t m = sc.nextInt();\n\t for(i = 0; i < m; i++) {\n\t \tk = 0;\n\t \tl = sc.nextInt();\n\t\t char[] b = new char[l];\n\t \tfor(j = 0; j < l; j++) {\n\t\t \tb[j] = a[j];\n\t\t }\n\t\t for(j = l; j < n; j++) {\n\t\t\t \tc[k] = a[j];\n\t\t\t \tk++;\n\t\t\t }\n\t\t for(j = 0; j < l; j++) {\n\t\t\t c[k] = b[j];\n\t\t\t k++;\n\t\t\t }\n\t\t for(j = 0; j < n; j++) {\n\t\t \ta[j] = c[j];\n\t\t }\n\t }\n\t for(i = 0; i < n; i++) {\n\t \tSystem.out.print(a[i]);\n\t }\n \tSystem.out.println();\n }\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int i, j, k, n, m, l;
while(true) {
String d = sc.next();
char[] a = d.toCharArray();
if(d.equals("-"))break;
n = a.length;
char[] c = new char[n];
m = sc.nextInt();
for(i = 0; i < m; i++) {
k = 0;
l = sc.nextInt();
char[] b = new char[l];
for(j = 0; j < l; j++) {
b[j] = a[j];
}
for(j = l; j < n; j++) {
c[k] = a[j];
k++;
}
for(j = 0; j < l; j++) {
c[k] = b[j];
k++;
}
for(j = 0; j < n; j++) {
a[j] = c[j];
}
}
for(i = 0; i < n; i++) {
System.out.print(a[i]);
}
System.out.println();
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
17,
42,
2,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
42,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
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
],
[
137,
14
],
[
137,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
32
],
[
27,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
23,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
39,
44
],
[
44,
45
],
[
23,
46
],
[
46,
47
],
[
46,
48
],
[
23,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
23,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
23,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
23,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
114,
118
],
[
113,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
126,
127
],
[
23,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
15,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
]
| [
"import java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Comparator;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }\n }\n}\n",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Comparator;",
"Comparator",
"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 while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }",
"true",
"{\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }",
"String originalSequence = \"\";",
"originalSequence",
"\"\"",
"while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }",
"originalSequence.length() == 0",
"originalSequence.length()",
"originalSequence.length",
"originalSequence",
"0",
"{\n originalSequence = scanner.nextLine();\n }",
"originalSequence = scanner.nextLine()",
"originalSequence",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"if (originalSequence.equals(\"-\")) {\n break;\n }",
"originalSequence.equals(\"-\")",
"originalSequence.equals",
"originalSequence",
"\"-\"",
"{\n break;\n }",
"break;",
"ArrayDeque<Character> chars = new ArrayDeque<Character>();",
"chars",
"new ArrayDeque<Character>()",
"for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < originalSequence.length()",
"i",
"originalSequence.length()",
"originalSequence.length",
"originalSequence",
"i++",
"i++",
"i",
"{\n chars.add(originalSequence.charAt(i));\n }",
"{\n chars.add(originalSequence.charAt(i));\n }",
"chars.add(originalSequence.charAt(i))",
"chars.add",
"chars",
"originalSequence.charAt(i)",
"originalSequence.charAt",
"originalSequence",
"i",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }",
"{\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }",
"int h = scanner.nextInt();",
"h",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n chars.add(chars.removeFirst());\n }",
"{\n chars.add(chars.removeFirst());\n }",
"chars.add(chars.removeFirst())",
"chars.add",
"chars",
"chars.removeFirst()",
"chars.removeFirst",
"chars",
"while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }",
"chars.size() > 0",
"chars.size()",
"chars.size",
"chars",
"0",
"{\n System.out.print(chars.removeFirst());\n }",
"System.out.print(chars.removeFirst())",
"System.out.print",
"System.out",
"System",
"System.out",
"chars.removeFirst()",
"chars.removeFirst",
"chars",
"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 scanner = new Scanner(System.in);\n while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n String originalSequence = \"\";\n while (originalSequence.length() == 0) {\n originalSequence = scanner.nextLine();\n }\n if (originalSequence.equals(\"-\")) {\n break;\n }\n ArrayDeque<Character> chars = new ArrayDeque<Character>();\n for (int i = 0; i < originalSequence.length(); i++) {\n chars.add(originalSequence.charAt(i));\n }\n int n = scanner.nextInt();\n for (int i = 0; i < n; i++) {\n int h = scanner.nextInt();\n for (int j = 0; j < h; j++) {\n chars.add(chars.removeFirst());\n }\n }\n while (chars.size() > 0) {\n System.out.print(chars.removeFirst());\n }\n System.out.println(\"\");\n }\n }\n}",
"Main"
]
| import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
String originalSequence = "";
while (originalSequence.length() == 0) {
originalSequence = scanner.nextLine();
}
if (originalSequence.equals("-")) {
break;
}
ArrayDeque<Character> chars = new ArrayDeque<Character>();
for (int i = 0; i < originalSequence.length(); i++) {
chars.add(originalSequence.charAt(i));
}
int n = scanner.nextInt();
for (int i = 0; i < n; i++) {
int h = scanner.nextInt();
for (int j = 0; j < h; j++) {
chars.add(chars.removeFirst());
}
}
while (chars.size() > 0) {
System.out.print(chars.removeFirst());
}
System.out.println("");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
4,
18,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
80,
5
],
[
80,
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
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
17,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
17,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
55,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
60,
64
],
[
17,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
6,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
]
| [
"import 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\tStringBuilder sb = new StringBuilder();\n\n\t\twhile (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}\n}",
"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\tStringBuilder sb = new StringBuilder();\n\n\t\twhile (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}",
"true",
"{\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}",
"String cards = scan.next();",
"cards",
"scan.next()",
"scan.next",
"scan",
"if (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"cards.equals(\"-\")",
"cards.equals",
"cards",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}",
"{\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"cards = (cards.substring(h) + cards.substring(0, h))",
"cards",
"(cards.substring(h) + cards.substring(0, h))",
"cards.substring(h)",
"cards.substring",
"cards",
"h",
"cards.substring(0, h)",
"cards.substring",
"cards",
"0",
"h",
"sb.append(cards + \"\\n\")",
"sb.append",
"sb",
"cards + \"\\n\"",
"cards",
"\"\\n\"",
"System.out.print(sb)",
"System.out.print",
"System.out",
"System",
"System.out",
"sb",
"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\tStringBuilder sb = new StringBuilder();\n\n\t\twhile (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}\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\tStringBuilder sb = new StringBuilder();\n\n\t\twhile (true) {\n\n\t\t\tString cards = scan.next();\n\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//System.out.println(\"cards = \" + cards);\n\n\t\t\tint m = scan.nextInt();\n\t\t\t//System.out.println(\"m = \" + m);\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\t//System.out.println(\"h = \" + h);\n\n\t\t\t\tcards = (cards.substring(h) + cards.substring(0, h));\n\t\t\t\t//System.out.println(cards);\n\t\t\t}\n\n\t\t\tsb.append(cards + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner scan = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
while (true) {
String cards = scan.next();
if (cards.equals("-")) {
break;
}
//System.out.println("cards = " + cards);
int m = scan.nextInt();
//System.out.println("m = " + m);
for (int i = 0; i < m; i++) {
int h = scan.nextInt();
//System.out.println("h = " + h);
cards = (cards.substring(h) + cards.substring(0, h));
//System.out.println(cards);
}
sb.append(cards + "\n");
}
System.out.print(sb);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
35
],
[
35,
36
],
[
35,
37
],
[
14,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
58,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }\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 while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }",
"true",
"{\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"if(str.equals(\"-\")) break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] array = new int[m];",
"array",
"new int[m]",
"m",
"String result = str;",
"result",
"str",
"for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }",
"{\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }",
"int shuffleNum = sc.nextInt();",
"shuffleNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"result = result.substring(shuffleNum) + result.substring(0, shuffleNum)",
"result",
"result.substring(shuffleNum) + result.substring(0, shuffleNum)",
"result.substring(shuffleNum)",
"result.substring",
"result",
"shuffleNum",
"result.substring(0, shuffleNum)",
"result.substring",
"result",
"0",
"shuffleNum",
"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){\n Scanner sc = new Scanner(System.in);\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")) break;\n int m = sc.nextInt();\n int[] array = new int[m];\n String result = str;\n for(int i = 0; i < m; i++){\n int shuffleNum = sc.nextInt();\n result = result.substring(shuffleNum) + result.substring(0, shuffleNum);\n }\n System.out.println(result);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(true){
String str = sc.next();
if(str.equals("-")) break;
int m = sc.nextInt();
int[] array = new int[m];
String result = str;
for(int i = 0; i < m; i++){
int shuffleNum = sc.nextInt();
result = result.substring(shuffleNum) + result.substring(0, shuffleNum);
}
System.out.println(result);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
0,
13,
4,
18,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
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
],
[
83,
8
],
[
83,
9
],
[
9,
10
],
[
9,
11
],
[
83,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
37,
38
],
[
26,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
26,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
51,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
62,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
51,
72
],
[
72,
73
],
[
26,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
12,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.*;\nimport java.text.*;\n/*\nMain class for AOJ where there is no input.\n*/\npublic class Main{\n public static final String EOF = \"END_OF_TEXT\";\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int n;\n int h;\n \n while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }\n }//main\n \n \n}//class",
"import java.util.*;",
"util.*",
"java",
"import java.text.*;",
"text.*",
"java",
"public class Main{\n public static final String EOF = \"END_OF_TEXT\";\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int n;\n int h;\n \n while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }\n }//main\n \n \n}//class",
"Main",
"public static final String EOF = \"END_OF_TEXT\";",
"EOF",
"\"END_OF_TEXT\"",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int n;\n int h;\n \n while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }\n }//main",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String str;\n int n;\n int h;\n \n while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str;",
"str",
"int n;",
"n",
"int h;",
"h",
"while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }",
"true",
"{\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(str.equals(\"-\")){\n break;\n }",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n break;\n }",
"break;",
"n = Integer.parseInt(sc.nextLine())",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }",
"n > 0",
"n",
"0",
"{\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }",
"h = Integer.parseInt(sc.nextLine())",
"h",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"str = str.substring(h) + str.substring(0,h)",
"str",
"str.substring(h) + str.substring(0,h)",
"str.substring(h)",
"str.substring",
"str",
"h",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"n--",
"n",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main{\n public static final String EOF = \"END_OF_TEXT\";\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int n;\n int h;\n \n while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }\n }//main\n \n \n}//class",
"public class Main{\n public static final String EOF = \"END_OF_TEXT\";\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int n;\n int h;\n \n while(true){\n str = sc.nextLine();\n if(str.equals(\"-\")){\n break;\n }\n n = Integer.parseInt(sc.nextLine());\n \n while(n > 0){\n h = Integer.parseInt(sc.nextLine());\n str = str.substring(h) + str.substring(0,h);\n n--;\n }\n System.out.println(str);\n }\n }//main\n \n \n}//class",
"Main"
]
| import java.util.*;
import java.text.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
public static final String EOF = "END_OF_TEXT";
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str;
int n;
int h;
while(true){
str = sc.nextLine();
if(str.equals("-")){
break;
}
n = Integer.parseInt(sc.nextLine());
while(n > 0){
h = Integer.parseInt(sc.nextLine());
str = str.substring(h) + str.substring(0,h);
n--;
}
System.out.println(str);
}
}//main
}//class
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
13,
4,
18,
18,
13,
13,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
14,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
47,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
47,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
47,
72
],
[
72,
73
],
[
72,
74
],
[
14,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner std = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}",
"Scanner std = new Scanner(System.in);",
"std",
"new Scanner(System.in)",
"while(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}",
"true",
"{\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}",
"String line = std.nextLine();",
"line",
"std.nextLine()",
"std.nextLine",
"std",
"if(line.equals(\"-\")){break;}",
"line.equals(\"-\")",
"line.equals",
"line",
"\"-\"",
"{break;}",
"break;",
"int n = Integer.parseInt(std.nextLine());",
"n",
"Integer.parseInt(std.nextLine())",
"Integer.parseInt",
"Integer",
"std.nextLine()",
"std.nextLine",
"std",
"for(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}",
"{\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}",
"int index = Integer.parseInt(std.nextLine());",
"index",
"Integer.parseInt(std.nextLine())",
"Integer.parseInt",
"Integer",
"std.nextLine()",
"std.nextLine",
"std",
"String newline = line.substring(index, line.length());",
"newline",
"line.substring(index, line.length())",
"line.substring",
"line",
"index",
"line.length()",
"line.length",
"line",
"newline += line.substring(0,index)",
"newline",
"line.substring(0,index)",
"line.substring",
"line",
"0",
"index",
"line = newline",
"line",
"newline",
"System.out.println(line)",
"System.out.println",
"System.out",
"System",
"System.out",
"line",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString line = std.nextLine();\n\n\t\t\tif(line.equals(\"-\")){break;}\n\n\t\t\tint n = Integer.parseInt(std.nextLine());\n\t\t\tfor(int i=0; i<n; i++){\n\t\t\t\tint index = Integer.parseInt(std.nextLine());\n\t\t\t\tString newline = line.substring(index, line.length());\n\t\t\t\tnewline += line.substring(0,index);\n\t\t\t\tline = newline;\n\t\t\t}\n\t\t\tSystem.out.println(line);\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner std = new Scanner(System.in);
while(true){
String line = std.nextLine();
if(line.equals("-")){break;}
int n = Integer.parseInt(std.nextLine());
for(int i=0; i<n; i++){
int index = Integer.parseInt(std.nextLine());
String newline = line.substring(index, line.length());
newline += line.substring(0,index);
line = newline;
}
System.out.println(line);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
20,
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
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
57,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
20,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
6,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\t public static void main(String[] args) {\n String s;\n int m, h;\n Scanner sc = new Scanner(System.in);\n while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t public static void main(String[] args) {\n String s;\n int m, h;\n Scanner sc = new Scanner(System.in);\n while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n String s;\n int m, h;\n Scanner sc = new Scanner(System.in);\n while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }\n\n }",
"main",
"{\n String s;\n int m, h;\n Scanner sc = new Scanner(System.in);\n while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }\n\n }",
"String s;",
"s",
"int m",
"m",
"h;",
"h",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }",
"true",
"{\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }",
"s = sc.next()",
"s",
"sc.next()",
"sc.next",
"sc",
"if(s.equals(\"-\")) break;",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"break;",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i ++",
"i ++",
"i",
"{\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }",
"{\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"s = s.substring(h) + s.substring(0, h)",
"s",
"s.substring(h) + s.substring(0, h)",
"s.substring(h)",
"s.substring",
"s",
"h",
"s.substring(0, h)",
"s.substring",
"s",
"0",
"h",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main {\n\t public static void main(String[] args) {\n String s;\n int m, h;\n Scanner sc = new Scanner(System.in);\n while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }\n\n }\n}",
"public class Main {\n\t public static void main(String[] args) {\n String s;\n int m, h;\n Scanner sc = new Scanner(System.in);\n while(true){\n s = sc.next();\n if(s.equals(\"-\")) break;\n m = sc.nextInt();\n for(int i = 0; i < m; i ++){\n h = sc.nextInt();\n s = s.substring(h) + s.substring(0, h);\n }\n System.out.println(s);\n }\n\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
String s;
int m, h;
Scanner sc = new Scanner(System.in);
while(true){
s = sc.next();
if(s.equals("-")) break;
m = sc.nextInt();
for(int i = 0; i < m; i ++){
h = sc.nextInt();
s = s.substring(h) + s.substring(0, h);
}
System.out.println(s);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
4,
18,
13,
14,
2,
18,
13,
17,
17,
3,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
41,
13,
18,
13,
13,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
22,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
14,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
14,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
64,
66
],
[
54,
67
],
[
67,
68
],
[
68,
69
],
[
54,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
14,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
14,
88
],
[
88,
89
],
[
89,
90
],
[
6,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }\n }\n\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }",
"true",
"{\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }",
"char[] c = sc.nextLine().toCharArray();",
"c",
"sc.nextLine().toCharArray()",
"sc.nextLine().toCharArray",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(c[0] == '-') break;",
"c[0] == '-'",
"c[0]",
"c",
"0",
"'-'",
"break;",
"int t = 0;",
"t",
"0",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0;i < m;++i) t += sc.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"++i",
"++i",
"i",
"t += sc.nextInt();",
"t += sc.nextInt()",
"t",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);",
"int i = 0,l = c.length;",
"int i = 0",
"i",
"0",
"l = c.length;",
"l",
"c.length",
"c",
"c.length",
"i < l",
"i",
"l",
"++i",
"++i",
"i",
"System.out.print(c[(t + i) % l]);",
"System.out.print(c[(t + i) % l])",
"System.out.print",
"System.out",
"System",
"System.out",
"c[(t + i) % l]",
"c",
"(t + i) % l",
"(t + i)",
"t",
"i",
"l",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n char[] c = sc.nextLine().toCharArray();\n if(c[0] == '-') break;\n int t = 0;\n int m = sc.nextInt();\n for(int i = 0;i < m;++i) t += sc.nextInt();\n for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);\n System.out.println();\n sc.nextLine();\n }\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(true){
char[] c = sc.nextLine().toCharArray();
if(c[0] == '-') break;
int t = 0;
int m = sc.nextInt();
for(int i = 0;i < m;++i) t += sc.nextInt();
for(int i = 0,l = c.length;i < l;++i) System.out.print(c[(t + i) % l]);
System.out.println();
sc.nextLine();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
11,
1,
41,
13,
17,
41,
13,
13,
2,
13,
13,
1,
40,
13,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
13,
17,
0,
18,
13,
13,
18,
13,
13,
30,
11,
1,
41,
13,
17,
41,
13,
13,
2,
13,
13,
1,
40,
13,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
13,
17,
0,
18,
13,
13,
18,
13,
13,
41,
13,
20,
14,
2,
2,
13,
17,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
205,
5
],
[
205,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
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
],
[
68,
69
],
[
69,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
78,
86
],
[
86,
87
],
[
86,
88
],
[
78,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
78,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
95,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
71,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
120,
122
],
[
112,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
112,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
129,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
142,
144
],
[
14,
145
],
[
145,
146
],
[
145,
147
],
[
14,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
148,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
160,
161
],
[
160,
162
],
[
155,
163
],
[
163,
164
],
[
164,
165
],
[
155,
166
],
[
167,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
168,
171
],
[
171,
172
],
[
171,
173
],
[
148,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
175,
180
],
[
180,
181
],
[
180,
182
],
[
175,
183
],
[
183,
184
],
[
184,
185
],
[
175,
186
],
[
187,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
191,
192
],
[
191,
193
],
[
14,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
194,
199
],
[
199,
200
],
[
200,
201
],
[
6,
202
],
[
202,
203
],
[
0,
204
],
[
204,
205
],
[
204,
206
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}\n\t}\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\twhile(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}",
"true",
"{\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}",
"String cards = sc.nextLine();",
"cards",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"cards.equals(\"-\")",
"cards.equals",
"cards",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"String[] cds = cards.split(\"\");",
"cds",
"cards.split(\"\")",
"cards.split",
"cards",
"\"\"",
"int cdlength = cards.length();",
"cdlength",
"cards.length()",
"cards.length",
"cards",
"String[] cds2 = new String[cdlength];",
"cds2",
"new String[cdlength]",
"cdlength",
"int repeat = Integer.parseInt(sc.nextLine());",
"repeat",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < repeat",
"i",
"repeat",
"i++",
"i++",
"i",
"{\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int shuffle = Integer.parseInt(sc.nextLine());",
"shuffle",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"{\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t}",
"for (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}",
"int j = 0, k = shuffle;",
"int j = 0",
"j",
"0",
"k = shuffle;",
"k",
"shuffle",
"j < cdlength",
"j",
"cdlength",
"j++, k++",
"j++",
"j",
"k++",
"k",
"{\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}",
"if (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}",
"k == cdlength",
"k",
"cdlength",
"{\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}",
"k =0",
"k",
"0",
"cds2[j] = cds[k]",
"cds2[j]",
"cds2",
"j",
"cds[k]",
"cds",
"k",
"{\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}",
"for (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}",
"int j = 0, k = shuffle;",
"int j = 0",
"j",
"0",
"k = shuffle;",
"k",
"shuffle",
"j < cdlength",
"j",
"cdlength",
"j++, k++",
"j++",
"j",
"k++",
"k",
"{\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}",
"if (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}",
"k == cdlength",
"k",
"cdlength",
"{\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}",
"k = 0",
"k",
"0",
"cds[j] = cds2[k]",
"cds[j]",
"cds",
"j",
"cds2[k]",
"cds2",
"k",
"StringBuilder after = new StringBuilder();",
"after",
"new StringBuilder()",
"if (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}",
"repeat % 2 == 0",
"repeat % 2",
"repeat",
"2",
"0",
"{\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t}",
"for (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cdlength",
"i",
"cdlength",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}",
"{\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}",
"after.append(cds[i])",
"after.append",
"after",
"cds[i]",
"cds",
"i",
"{\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}",
"for (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cdlength",
"i",
"cdlength",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}",
"{\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}",
"after.append(cds2[i])",
"after.append",
"after",
"cds2[i]",
"cds2",
"i",
"System.out.println(after.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"after.toString()",
"after.toString",
"after",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tString cards = sc.nextLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] cds = cards.split(\"\");\n\t\t\tint cdlength = cards.length();\n\t\t\tString[] cds2 = new String[cdlength];\n\t\t\tint repeat = Integer.parseInt(sc.nextLine());\n\t\t\tfor (int i = 0; i < repeat; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(sc.nextLine());\n\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk =0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds2[j] = cds[k];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (int j = 0, k = shuffle; j < cdlength; j++, k++) {\n\t\t\t\t\t\tif (k == cdlength) {\n\t\t\t\t\t\t\tk = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcds[j] = cds2[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tStringBuilder after = new StringBuilder();\n\t\t\tif (repeat % 2 == 0) {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < cdlength; i++) {\n\t\t\t\t\tafter.append(cds2[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(after.toString());\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
String cards = sc.nextLine();
if (cards.equals("-")) {
break;
}
String[] cds = cards.split("");
int cdlength = cards.length();
String[] cds2 = new String[cdlength];
int repeat = Integer.parseInt(sc.nextLine());
for (int i = 0; i < repeat; i++) {
int shuffle = Integer.parseInt(sc.nextLine());
if (i % 2 == 0) {
for (int j = 0, k = shuffle; j < cdlength; j++, k++) {
if (k == cdlength) {
k =0;
}
cds2[j] = cds[k];
}
} else {
for (int j = 0, k = shuffle; j < cdlength; j++, k++) {
if (k == cdlength) {
k = 0;
}
cds[j] = cds2[k];
}
}
}
StringBuilder after = new StringBuilder();
if (repeat % 2 == 0) {
for (int i = 0; i < cdlength; i++) {
after.append(cds[i]);
}
} else {
for (int i = 0; i < cdlength; i++) {
after.append(cds2[i]);
}
}
System.out.println(after.toString());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
30,
41,
13,
41,
13,
20,
17,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
41,
13,
17,
41,
13,
2,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
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,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
2,
13,
17,
13,
18,
13,
2,
13,
13,
0,
13,
18,
13,
13,
0,
13,
18,
13,
13,
11,
1,
41,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
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
],
[
181,
11
],
[
181,
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
],
[
22,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
31,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
40,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
39,
63
],
[
63,
64
],
[
63,
65
],
[
39,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
68,
72
],
[
39,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
39,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
39,
84
],
[
84,
85
],
[
84,
86
],
[
39,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
100,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
114,
124
],
[
124,
125
],
[
125,
126
],
[
114,
127
],
[
128,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
133,
133
],
[
133,
134
],
[
133,
135
],
[
133,
136
],
[
129,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
100,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
100,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
39,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
152,
160
],
[
160,
161
],
[
161,
162
],
[
152,
163
],
[
164,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
165,
170
],
[
170,
171
],
[
170,
172
],
[
39,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
12,
178
],
[
178,
179
],
[
0,
180
],
[
180,
181
],
[
180,
182
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\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",
"public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\n\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\n\n }\n }",
"main",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\n\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\n\n }",
"catch(IOException e){\n\n }",
"IOException e",
"{\n\n }",
"{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }",
"String line1;",
"line1",
"char[] ch = new char[200000];",
"ch",
"new char[200000]",
"200000",
"while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }",
"!(line1 = reader.readLine()).equals(\"-\")",
"(line1 = reader.readLine()).equals(\"-\")",
"(line1 = reader.readLine()).equals",
"(line1 = reader.readLine())",
"line1",
"reader.readLine()",
"reader.readLine",
"reader",
"\"-\"",
"{\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }",
"for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < line1.length()",
"i",
"line1.length()",
"line1.length",
"line1",
"i++",
"i++",
"i",
"{\n ch[i] = line1.charAt(i);\n }",
"{\n ch[i] = line1.charAt(i);\n }",
"ch[i] = line1.charAt(i)",
"ch[i]",
"ch",
"i",
"line1.charAt(i)",
"line1.charAt",
"line1",
"i",
"int l = 0;",
"l",
"0",
"int r = line1.length() - 1;",
"r",
"line1.length() - 1",
"line1.length()",
"line1.length",
"line1",
"1",
"String line2 = reader.readLine();",
"line2",
"reader.readLine()",
"reader.readLine",
"reader",
"int m = Integer.parseInt(line2);",
"m",
"Integer.parseInt(line2)",
"Integer.parseInt",
"Integer",
"line2",
"int[] h = new int[m];",
"h",
"new int[m]",
"m",
"for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }",
"{\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }",
"String line3 = reader.readLine();",
"line3",
"reader.readLine()",
"reader.readLine",
"reader",
"h[i] = Integer.parseInt(line3)",
"h[i]",
"h",
"i",
"Integer.parseInt(line3)",
"Integer.parseInt",
"Integer",
"line3",
"for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h[i]",
"j",
"h[i]",
"h",
"i",
"j++",
"j++",
"j",
"{\n ch[r + 1 + j] = ch[l + j];\n }",
"{\n ch[r + 1 + j] = ch[l + j];\n }",
"ch[r + 1 + j] = ch[l + j]",
"ch[r + 1 + j]",
"ch",
"r + 1 + j",
"r + 1 + j",
"r",
"1",
"j",
"ch[l + j]",
"ch",
"l + j",
"l",
"j",
"l += h[i]",
"l",
"h[i]",
"h",
"i",
"r += h[i]",
"r",
"h[i]",
"h",
"i",
"for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }",
"int i = l;",
"int i = l;",
"i",
"l",
"i <= r",
"i",
"r",
"i++",
"i++",
"i",
"{\n System.out.print(ch[i]);\n }",
"{\n System.out.print(ch[i]);\n }",
"System.out.print(ch[i])",
"System.out.print",
"System.out",
"System",
"System.out",
"ch[i]",
"ch",
"i",
"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 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\n\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n String line1;\n char[] ch = new char[200000];\n while(!(line1 = reader.readLine()).equals(\"-\")){\n for(int i = 0; i < line1.length(); i++){\n ch[i] = line1.charAt(i);\n }\n int l = 0;\n int r = line1.length() - 1;\n String line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n int[] h = new int[m];\n for(int i = 0; i < m; i++){\n String line3 = reader.readLine();\n h[i] = Integer.parseInt(line3);\n for(int j = 0; j < h[i]; j++){\n ch[r + 1 + j] = ch[l + j];\n }\n l += h[i];\n r += h[i];\n }\n for(int i = l; i <= r; i++){\n System.out.print(ch[i]);\n }\n System.out.println();\n }\n }catch(IOException e){\n\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try{
String line1;
char[] ch = new char[200000];
while(!(line1 = reader.readLine()).equals("-")){
for(int i = 0; i < line1.length(); i++){
ch[i] = line1.charAt(i);
}
int l = 0;
int r = line1.length() - 1;
String line2 = reader.readLine();
int m = Integer.parseInt(line2);
int[] h = new int[m];
for(int i = 0; i < m; i++){
String line3 = reader.readLine();
h[i] = Integer.parseInt(line3);
for(int j = 0; j < h[i]; j++){
ch[r + 1 + j] = ch[l + j];
}
l += h[i];
r += h[i];
}
for(int i = l; i <= r; i++){
System.out.print(ch[i]);
}
System.out.println();
}
}catch(IOException e){
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
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
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
21,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
28,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
28,
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
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
74,
78
],
[
28,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
12,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString str;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\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",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString str;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString str;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString str;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"while ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}",
"(str = br.readLine()) != null",
"(str = br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}",
"if (str.equals(\"-\")) break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}",
"int h = Integer.parseInt(br.readLine());",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"str = str.substring(h, str.length()) + str.substring(0, h)",
"str",
"str.substring(h, str.length()) + str.substring(0, h)",
"str.substring(h, str.length())",
"str.substring",
"str",
"h",
"str.length()",
"str.length",
"str",
"str.substring(0, h)",
"str.substring",
"str",
"0",
"h",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString str;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString str;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0, h);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = br.readLine()) != null) {
if (str.equals("-")) break;
int n = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
int h = Integer.parseInt(br.readLine());
str = str.substring(h, str.length()) + str.substring(0, h);
}
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
17,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
14,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
47,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
47,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
47,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
14,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
74,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }\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 while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }",
"true",
"{\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if(s.equals(\"-\")){\n break;\n }",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"{\n break;\n }",
"break;",
"int m = Integer.parseInt(sc.next());",
"m",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }",
"{\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }",
"int x = Integer.parseInt(sc.next());",
"x",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"String s1 = s.substring(0, x);",
"s1",
"s.substring(0, x)",
"s.substring",
"s",
"0",
"x",
"String s2 = s.substring(x);",
"s2",
"s.substring(x)",
"s.substring",
"s",
"x",
"s = s2 + s1",
"s",
"s2 + s1",
"s2",
"s1",
"System.out.printf(\"%s\\n\", s)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%s\\n\"",
"s",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true){\n String s = sc.next();\n if(s.equals(\"-\")){\n break;\n }\n int m = Integer.parseInt(sc.next());\n for(int i = 0; i < m; i++){\n int x = Integer.parseInt(sc.next());\n String s1 = s.substring(0, x);\n String s2 = s.substring(x);\n s = s2 + s1;\n }\n System.out.printf(\"%s\\n\", s);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(true){
String s = sc.next();
if(s.equals("-")){
break;
}
int m = Integer.parseInt(sc.next());
for(int i = 0; i < m; i++){
int x = Integer.parseInt(sc.next());
String s1 = s.substring(0, x);
String s2 = s.substring(x);
s = s2 + s1;
}
System.out.printf("%s\n", s);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
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
],
[
82,
11
],
[
82,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
23,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
31,
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
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
63,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
31,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
12,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line = \"\";",
"line",
"\"\"",
"while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }",
"!(line = br.readLine()).equals(\"-\")",
"(line = br.readLine()).equals(\"-\")",
"(line = br.readLine()).equals",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"\"-\"",
"{\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }",
"{\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }",
"int m = Integer.parseInt(br.readLine());",
"m",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"line = line.substring(m) + line.substring(0, m)",
"line",
"line.substring(m) + line.substring(0, m)",
"line.substring(m)",
"line.substring",
"line",
"m",
"line.substring(0, m)",
"line.substring",
"line",
"0",
"m",
"System.out.println(line)",
"System.out.println",
"System.out",
"System",
"System.out",
"line",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n line = line.substring(m) + line.substring(0, m);\n }\n System.out.println(line);\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
while (!(line = br.readLine()).equals("-")) {
int n = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
int m = Integer.parseInt(br.readLine());
line = line.substring(m) + line.substring(0, m);
}
System.out.println(line);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
30,
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,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
2,
13,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
185,
5
],
[
185,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
33,
34
],
[
33,
35
],
[
27,
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
],
[
27,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
27,
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
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
75,
81
],
[
81,
82
],
[
81,
83
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
75,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
105,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
75,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
134,
135
],
[
134,
136
],
[
129,
137
],
[
137,
138
],
[
138,
139
],
[
129,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
142,
150
],
[
150,
151
],
[
150,
152
],
[
27,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
158,
159
],
[
158,
160
],
[
153,
161
],
[
161,
162
],
[
162,
163
],
[
153,
164
],
[
165,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
166,
171
],
[
171,
172
],
[
171,
173
],
[
27,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
8,
179
],
[
179,
180
],
[
180,
181
],
[
6,
182
],
[
182,
183
],
[
0,
184
],
[
184,
185
],
[
184,
186
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tsc.close();\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 sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\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\twhile (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"{\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}",
"int n = s.length();",
"n",
"s.length()",
"s.length",
"s",
"char[] alp = new char[n];",
"alp",
"new char[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}",
"{\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}",
"alp[i] = s.charAt(i)",
"alp[i]",
"alp",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"char[] tmp = new char[h];",
"tmp",
"new char[h]",
"h",
"for (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}",
"tmp[j] = alp[j]",
"tmp[j]",
"tmp",
"j",
"alp[j]",
"alp",
"j",
"for (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n - h",
"j",
"n - h",
"n",
"h",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}",
"alp[j] = alp[j + h]",
"alp[j]",
"alp",
"j",
"alp[j + h]",
"alp",
"j + h",
"j",
"h",
"for (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}",
"alp[n - h + j] = tmp[j]",
"alp[n - h + j]",
"alp",
"n - h + j",
"n - h",
"n",
"h",
"j",
"tmp[j]",
"tmp",
"j",
"for (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}",
"{\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}",
"System.out.print(alp[i])",
"System.out.print",
"System.out",
"System",
"System.out",
"alp[i]",
"alp",
"i",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"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\twhile (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\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\twhile (true) {\n\t\t\tString s = sc.next();\n\t\t\tif (s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint n = s.length();\n\t\t\t\tchar[] alp = new char[n];\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\talp[i] = s.charAt(i);\n\t\t\t\t}\n\t\t\t\tint m = sc.nextInt();\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\tchar[] tmp = new char[h];\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\ttmp[j] = alp[j];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < n - h; j++) {\n\t\t\t\t\t\talp[j] = alp[j + h];\n\t\t\t\t\t}\n\t\t\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\t\t\talp[n - h + j] = tmp[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tSystem.out.print(alp[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String s = sc.next();
if (s.equals("-")) {
break;
} else {
int n = s.length();
char[] alp = new char[n];
for (int i = 0; i < n; i++) {
alp[i] = s.charAt(i);
}
int m = sc.nextInt();
for (int i = 0; i < m; i++) {
int h = sc.nextInt();
char[] tmp = new char[h];
for (int j = 0; j < h; j++) {
tmp[j] = alp[j];
}
for (int j = 0; j < n - h; j++) {
alp[j] = alp[j + h];
}
for (int j = 0; j < h; j++) {
alp[n - h + j] = tmp[j];
}
}
for (int i = 0; i < n; i++) {
System.out.print(alp[i]);
}
System.out.println();
}
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
13,
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,
13,
13,
18,
13,
13,
11,
1,
41,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
2,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
166,
5
],
[
166,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
14,
37
],
[
37,
38
],
[
14,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
14,
45
],
[
45,
46
],
[
45,
47
],
[
14,
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
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
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
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
61,
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
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
106,
107
],
[
106,
108
],
[
61,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
109,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
127,
129
],
[
122,
130
],
[
130,
131
],
[
130,
132
],
[
14,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
138,
139
],
[
138,
140
],
[
133,
141
],
[
141,
142
],
[
142,
143
],
[
133,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
151,
153
],
[
14,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
8,
160
],
[
160,
161
],
[
161,
162
],
[
6,
163
],
[
163,
164
],
[
0,
165
],
[
165,
166
],
[
165,
167
]
]
| [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }\n\n sc.close();\n }\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\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }\n\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }\n\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }",
"true",
"{\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"if(str.equals(\"-\")){\n break;\n }",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n break;\n }",
"break;",
"int num = str.length()",
"num",
"str.length()",
"str.length",
"str",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"h;",
"h",
"String ar[] =str.split(\"\")",
"ar",
"str.split(\"\")",
"str.split",
"str",
"\"\"",
"ex[]=new String[num];",
"ex",
"new String[num]",
"num",
"for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }",
"{\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }",
"h=sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<h",
"j",
"h",
"j++",
"j++",
"j",
"{\n ex[j]=ar[j];\n }",
"{\n ex[j]=ar[j];\n }",
"ex[j]=ar[j]",
"ex[j]",
"ex",
"j",
"ar[j]",
"ar",
"j",
"for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }",
"int l=h;",
"int l=h;",
"l",
"h",
"l<num",
"l",
"num",
"l++",
"l++",
"l",
"{\n ar[l-h]=ar[l];\n }",
"{\n ar[l-h]=ar[l];\n }",
"ar[l-h]=ar[l]",
"ar[l-h]",
"ar",
"l-h",
"l",
"h",
"ar[l]",
"ar",
"l",
"for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<h",
"k",
"h",
"k++",
"k++",
"k",
"{\n ar[k+(num-h)]=ex[k];\n }",
"{\n ar[k+(num-h)]=ex[k];\n }",
"ar[k+(num-h)]=ex[k]",
"ar[k+(num-h)]",
"ar",
"k+(num-h)",
"k",
"(num-h)",
"num",
"h",
"ex[k]",
"ex",
"k",
"for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }",
"int r=0;",
"int r=0;",
"r",
"0",
"r<num",
"r",
"num",
"r++",
"r++",
"r",
"{\n System.out.print(ar[r]);\n }",
"{\n System.out.print(ar[r]);\n }",
"System.out.print(ar[r])",
"System.out.print",
"System.out",
"System",
"System.out",
"ar[r]",
"ar",
"r",
"System.out.print(\"\\n\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"\\n\"",
"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\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }\n\n sc.close();\n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while(true){\n String str = sc.next();\n if(str.equals(\"-\")){\n break;\n }\n int num = str.length(),m = sc.nextInt(),h;\n String ar[] =str.split(\"\"),ex[]=new String[num];\n for(int i=0;i<m;i++){\n h=sc.nextInt();\n for(int j=0;j<h;j++){\n ex[j]=ar[j];\n }\n for(int l=h;l<num;l++){\n ar[l-h]=ar[l];\n }\n for(int k=0;k<h;k++){\n ar[k+(num-h)]=ex[k];\n }\n }\n for(int r=0;r<num;r++){\n System.out.print(ar[r]);\n }\n System.out.print(\"\\n\");\n }\n\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
String str = sc.next();
if(str.equals("-")){
break;
}
int num = str.length(),m = sc.nextInt(),h;
String ar[] =str.split(""),ex[]=new String[num];
for(int i=0;i<m;i++){
h=sc.nextInt();
for(int j=0;j<h;j++){
ex[j]=ar[j];
}
for(int l=h;l<num;l++){
ar[l-h]=ar[l];
}
for(int k=0;k<h;k++){
ar[k+(num-h)]=ex[k];
}
}
for(int r=0;r<num;r++){
System.out.print(ar[r]);
}
System.out.print("\n");
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
41,
13,
20,
2,
18,
13,
13,
13,
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
2,
18,
13,
13,
13,
13,
18,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
224,
5
],
[
224,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
14,
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
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
14,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
14,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
6,
98
],
[
98,
99
],
[
224,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
102,
115
],
[
115,
116
],
[
115,
117
],
[
118,
119
],
[
118,
120
],
[
102,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
121,
131
],
[
131,
132
],
[
132,
133
],
[
121,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
140,
142
],
[
102,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
143,
153
],
[
153,
154
],
[
154,
155
],
[
143,
156
],
[
157,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
102,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
174,
176
],
[
167,
177
],
[
177,
178
],
[
178,
179
],
[
167,
180
],
[
181,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
186,
188
],
[
102,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
189,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
196,
198
],
[
189,
199
],
[
199,
200
],
[
200,
201
],
[
189,
202
],
[
203,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
208,
212
],
[
207,
213
],
[
204,
214
],
[
214,
215
],
[
214,
216
],
[
102,
217
],
[
217,
218
],
[
100,
219
],
[
219,
220
],
[
100,
221
],
[
221,
222
],
[
0,
223
],
[
223,
224
],
[
223,
225
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\n\n\t\tdo {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);\n\n\t\tsc.close();\n\n\t}\n\n\tprivate static char[] shuffle(char[] cards, int h) {\n\t\tchar[] cards_tmp1 = new char[h];\n\t\tchar[] cards_tmp2 = new char[cards.length - h];\n\t\tchar[] cards_ex = new char[cards.length];\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}\n\n\t return cards_ex;\n\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 sc = new Scanner(System.in);\n\n\n\n\t\tdo {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);\n\n\t\tsc.close();\n\n\t}\n\n\tprivate static char[] shuffle(char[] cards, int h) {\n\t\tchar[] cards_tmp1 = new char[h];\n\t\tchar[] cards_tmp2 = new char[cards.length - h];\n\t\tchar[] cards_ex = new char[cards.length];\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}\n\n\t return cards_ex;\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\n\n\t\tdo {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);\n\n\t\tsc.close();\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\n\n\t\tdo {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);\n\n\t\tsc.close();\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"do {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);",
"true",
"{\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}",
"String str = sc.nextLine() ;",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"char[] cards = str.toCharArray();",
"cards",
"str.toCharArray()",
"str.toCharArray",
"str",
"int m = Integer.parseInt(sc.nextLine());",
"m",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}",
"{\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}",
"int h = Integer.parseInt(sc.nextLine());",
"h",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"cards = shuffle(cards, h)",
"cards",
"shuffle(cards, h)",
"shuffle",
"cards",
"h",
"for (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < cards.length",
"j",
"cards.length",
"cards",
"cards.length",
"j++",
"j++",
"j",
"{\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}",
"System.out.print(cards[j])",
"System.out.print",
"System.out",
"System",
"System.out",
"cards[j]",
"cards",
"j",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"private static char[] shuffle(char[] cards, int h) {\n\t\tchar[] cards_tmp1 = new char[h];\n\t\tchar[] cards_tmp2 = new char[cards.length - h];\n\t\tchar[] cards_ex = new char[cards.length];\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}\n\n\t return cards_ex;\n\n\t}",
"shuffle",
"{\n\t\tchar[] cards_tmp1 = new char[h];\n\t\tchar[] cards_tmp2 = new char[cards.length - h];\n\t\tchar[] cards_ex = new char[cards.length];\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}\n\n\t return cards_ex;\n\n\t}",
"char[] cards_tmp1 = new char[h];",
"cards_tmp1",
"new char[h]",
"h",
"char[] cards_tmp2 = new char[cards.length - h];",
"cards_tmp2",
"new char[cards.length - h]",
"cards.length - h",
"cards.length",
"cards",
"cards.length",
"h",
"char[] cards_ex = new char[cards.length];",
"cards_ex",
"new char[cards.length]",
"cards.length",
"cards",
"cards.length",
"for (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cards_tmp1.length",
"i",
"cards_tmp1.length",
"cards_tmp1",
"cards_tmp1.length",
"i++",
"i++",
"i",
"{\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}",
"{\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}",
"cards_tmp1[i] = cards[i]",
"cards_tmp1[i]",
"cards_tmp1",
"i",
"cards[i]",
"cards",
"i",
"for (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cards_tmp2.length",
"i",
"cards_tmp2.length",
"cards_tmp2",
"cards_tmp2.length",
"i++",
"i++",
"i",
"{\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}",
"{\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}",
"cards_tmp2[i] = cards[h + i]",
"cards_tmp2[i]",
"cards_tmp2",
"i",
"cards[h + i]",
"cards",
"h + i",
"h",
"i",
"for (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cards_tmp2.length",
"i",
"cards_tmp2.length",
"cards_tmp2",
"cards_tmp2.length",
"i++",
"i++",
"i",
"{\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}",
"{\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}",
"cards_ex[i] = cards_tmp2[i]",
"cards_ex[i]",
"cards_ex",
"i",
"cards_tmp2[i]",
"cards_tmp2",
"i",
"for (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cards_tmp1.length",
"i",
"cards_tmp1.length",
"cards_tmp1",
"cards_tmp1.length",
"i++",
"i++",
"i",
"{\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}",
"{\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}",
"cards_ex[cards.length - h + i] = cards_tmp1[i]",
"cards_ex[cards.length - h + i]",
"cards_ex",
"cards.length - h + i",
"cards.length - h",
"cards.length",
"cards",
"cards.length",
"h",
"i",
"cards_tmp1[i]",
"cards_tmp1",
"i",
"return cards_ex;",
"cards_ex",
"char[] cards",
"cards",
"int h",
"h",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\n\n\t\tdo {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);\n\n\t\tsc.close();\n\n\t}\n\n\tprivate static char[] shuffle(char[] cards, int h) {\n\t\tchar[] cards_tmp1 = new char[h];\n\t\tchar[] cards_tmp2 = new char[cards.length - h];\n\t\tchar[] cards_ex = new char[cards.length];\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}\n\n\t return cards_ex;\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\n\n\t\tdo {\n\n\t\t\tString str = sc.nextLine() ;\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchar[] cards = str.toCharArray();\n\n\t\t\tint m = Integer.parseInt(sc.nextLine());\n\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tint h = Integer.parseInt(sc.nextLine());\n\t\t\t\tcards = shuffle(cards, h);\n\t\t\t}\n\n\t\t\tfor (int j = 0; j < cards.length; j++) {\n\t\t\t\tSystem.out.print(cards[j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\n\t\t}while(true);\n\n\t\tsc.close();\n\n\t}\n\n\tprivate static char[] shuffle(char[] cards, int h) {\n\t\tchar[] cards_tmp1 = new char[h];\n\t\tchar[] cards_tmp2 = new char[cards.length - h];\n\t\tchar[] cards_ex = new char[cards.length];\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_tmp1[i] = cards[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_tmp2[i] = cards[h + i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp2.length; i++) {\n\t\t\tcards_ex[i] = cards_tmp2[i];\n\t\t}\n\n\t\tfor (int i = 0; i < cards_tmp1.length; i++) {\n\t\t\tcards_ex[cards.length - h + i] = cards_tmp1[i];\n\t\t}\n\n\t return cards_ex;\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
do {
String str = sc.nextLine() ;
if(str.equals("-")) {
break;
}
char[] cards = str.toCharArray();
int m = Integer.parseInt(sc.nextLine());
for (int i = 0; i < m; i++) {
int h = Integer.parseInt(sc.nextLine());
cards = shuffle(cards, h);
}
for (int j = 0; j < cards.length; j++) {
System.out.print(cards[j]);
}
System.out.println();
}while(true);
sc.close();
}
private static char[] shuffle(char[] cards, int h) {
char[] cards_tmp1 = new char[h];
char[] cards_tmp2 = new char[cards.length - h];
char[] cards_ex = new char[cards.length];
for (int i = 0; i < cards_tmp1.length; i++) {
cards_tmp1[i] = cards[i];
}
for (int i = 0; i < cards_tmp2.length; i++) {
cards_tmp2[i] = cards[h + i];
}
for (int i = 0; i < cards_tmp2.length; i++) {
cards_ex[i] = cards_tmp2[i];
}
for (int i = 0; i < cards_tmp1.length; i++) {
cards_ex[cards.length - h + i] = cards_tmp1[i];
}
return cards_ex;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
2,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
24,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
24,
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
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
53,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
53,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
53,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
24,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n\tScanner in = new Scanner(System.in);\n\n\tString before;\n\tint order;\n\tint num;\n\tString str1,str2;\n\t\n\n\twhile(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n\tScanner in = new Scanner(System.in);\n\n\tString before;\n\tint order;\n\tint num;\n\tString str1,str2;\n\t\n\n\twhile(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}\n }\n}",
"Main",
"public static void main(String[] args){\n\tScanner in = new Scanner(System.in);\n\n\tString before;\n\tint order;\n\tint num;\n\tString str1,str2;\n\t\n\n\twhile(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}\n }",
"main",
"{\n\tScanner in = new Scanner(System.in);\n\n\tString before;\n\tint order;\n\tint num;\n\tString str1,str2;\n\t\n\n\twhile(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String before;",
"before",
"int order;",
"order",
"int num;",
"num",
"String str1",
"str1",
"str2;",
"str2",
"while(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}",
"true",
"{\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}",
"before = in.next()",
"before",
"in.next()",
"in.next",
"in",
"if(before.equals(\"-\"))break;",
"before.equals(\"-\")",
"before.equals",
"before",
"\"-\"",
"break;",
"num = in.nextInt()",
"num",
"in.nextInt()",
"in.nextInt",
"in",
"for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<num",
"i",
"num",
"i++",
"i++",
"i",
"{\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }",
"{\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }",
"order = in.nextInt()",
"order",
"in.nextInt()",
"in.nextInt",
"in",
"str2 = before.substring(0,order)",
"str2",
"before.substring(0,order)",
"before.substring",
"before",
"0",
"order",
"str1 = before.substring(order,before.length())",
"str1",
"before.substring(order,before.length())",
"before.substring",
"before",
"order",
"before.length()",
"before.length",
"before",
"before = str1+str2",
"before",
"str1+str2",
"str1",
"str2",
"System.out.println(before)",
"System.out.println",
"System.out",
"System",
"System.out",
"before",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n\tScanner in = new Scanner(System.in);\n\n\tString before;\n\tint order;\n\tint num;\n\tString str1,str2;\n\t\n\n\twhile(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}\n }\n}",
"public class Main{\n public static void main(String[] args){\n\tScanner in = new Scanner(System.in);\n\n\tString before;\n\tint order;\n\tint num;\n\tString str1,str2;\n\t\n\n\twhile(true){\n\t before = in.next();\n\t if(before.equals(\"-\"))break;\n\t num = in.nextInt();\n\n\t for(int i=0;i<num;i++){\n\t\torder = in.nextInt();\n\t \n\t\tstr2 = before.substring(0,order);\n\t\tstr1 = before.substring(order,before.length());\n\t\tbefore = str1+str2;\n\t }\n\t System.out.println(before);\n\n\t}\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
String before;
int order;
int num;
String str1,str2;
while(true){
before = in.next();
if(before.equals("-"))break;
num = in.nextInt();
for(int i=0;i<num;i++){
order = in.nextInt();
str2 = before.substring(0,order);
str1 = before.substring(order,before.length());
before = str1+str2;
}
System.out.println(before);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
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,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
2,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
0,
13,
4,
18,
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
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
23,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
23,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
23,
51
],
[
51,
52
],
[
51,
53
],
[
23,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
75,
77
],
[
67,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
78,
90
],
[
90,
91
],
[
91,
92
],
[
78,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
67,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
106,
116
],
[
116,
117
],
[
117,
118
],
[
106,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
67,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
23,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
9,
139
],
[
139,
140
]
]
| [
"import java.io.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString answer = \"\";\t\n\t\tString temp = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tchar[] targetChar = temp.toCharArray();\n\t\t\tint targetLength = temp.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\tint[] shuffleBegin = new int[shuffleTimes];\n\t\t\t\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}\n\t\t\tSystem.out.println(answer);\t\t\n\t\t}\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString answer = \"\";\t\n\t\tString temp = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tchar[] targetChar = temp.toCharArray();\n\t\t\tint targetLength = temp.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\tint[] shuffleBegin = new int[shuffleTimes];\n\t\t\t\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}\n\t\t\tSystem.out.println(answer);\t\t\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)throws NumberFormatException, IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString answer = \"\";\t\n\t\tString temp = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tchar[] targetChar = temp.toCharArray();\n\t\t\tint targetLength = temp.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\tint[] shuffleBegin = new int[shuffleTimes];\n\t\t\t\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}\n\t\t\tSystem.out.println(answer);\t\t\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString answer = \"\";\t\n\t\tString temp = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tchar[] targetChar = temp.toCharArray();\n\t\t\tint targetLength = temp.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\tint[] shuffleBegin = new int[shuffleTimes];\n\t\t\t\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}\n\t\t\tSystem.out.println(answer);\t\t\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String answer = \"\";",
"answer",
"\"\"",
"String temp = \"\";",
"temp",
"\"\"",
"while(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tchar[] targetChar = temp.toCharArray();\n\t\t\tint targetLength = temp.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\tint[] shuffleBegin = new int[shuffleTimes];\n\t\t\t\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}\n\t\t\tSystem.out.println(answer);\t\t\n\t\t}",
"true",
"{\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tchar[] targetChar = temp.toCharArray();\n\t\t\tint targetLength = temp.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\tint[] shuffleBegin = new int[shuffleTimes];\n\t\t\t\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}\n\t\t\tSystem.out.println(answer);\t\t\n\t\t}",
"temp = scan.next()",
"temp",
"scan.next()",
"scan.next",
"scan",
"if(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}",
"temp.equals(\"-\")",
"temp.equals",
"temp",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"char[] targetChar = temp.toCharArray();",
"targetChar",
"temp.toCharArray()",
"temp.toCharArray",
"temp",
"int targetLength = temp.length();",
"targetLength",
"temp.length()",
"temp.length",
"temp",
"int shuffleTimes = scan.nextInt();",
"shuffleTimes",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] shuffleBegin = new int[shuffleTimes];",
"shuffleBegin",
"new int[shuffleTimes]",
"shuffleTimes",
"for(int i =0;i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<shuffleTimes",
"i",
"shuffleTimes",
"i++",
"i++",
"i",
"{\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}",
"{\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\tanswer = \"\";\n\t\t\t\tfor(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\ttargetChar = answer.toCharArray();\n\t\t\t}",
"shuffleBegin[i] = scan.nextInt()",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"answer = \"\"",
"answer",
"\"\"",
"for(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<(targetLength - shuffleBegin[i])",
"j",
"(targetLength - shuffleBegin[i])",
"targetLength",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}",
"{\n\t\t\t\t\tanswer = answer + targetChar[j + shuffleBegin[i]];\n\t\t\t\t}",
"answer = answer + targetChar[j + shuffleBegin[i]]",
"answer",
"answer + targetChar[j + shuffleBegin[i]]",
"answer",
"targetChar[j + shuffleBegin[i]]",
"targetChar",
"j + shuffleBegin[i]",
"j",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"for(int j=0; j<shuffleBegin[i]; j++){\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<shuffleBegin[i]",
"j",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}",
"{\n\t\t\t\t\tanswer = answer + targetChar[j];\n\t\t\t\t}",
"answer = answer + targetChar[j]",
"answer",
"answer + targetChar[j]",
"answer",
"targetChar[j]",
"targetChar",
"j",
"targetChar = answer.toCharArray()",
"targetChar",
"answer.toCharArray()",
"answer.toCharArray",
"answer",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args"
]
| import java.io.IOException;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws NumberFormatException, IOException{
Scanner scan = new Scanner(System.in);
String answer = "";
String temp = "";
while(true){
temp = scan.next();
if(temp.equals("-")){
break;
}
char[] targetChar = temp.toCharArray();
int targetLength = temp.length();
int shuffleTimes = scan.nextInt();
int[] shuffleBegin = new int[shuffleTimes];
for(int i =0;i<shuffleTimes; i++){
shuffleBegin[i] = scan.nextInt();
answer = "";
for(int j=0; j<(targetLength - shuffleBegin[i]) ; j++){
answer = answer + targetChar[j + shuffleBegin[i]];
}
for(int j=0; j<shuffleBegin[i]; j++){
answer = answer + targetChar[j];
}
targetChar = answer.toCharArray();
}
System.out.println(answer);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
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
],
[
89,
11
],
[
89,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
22,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
30,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
54,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
66,
71
],
[
66,
72
],
[
54,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
30,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
84,
85
],
[
12,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\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",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"while(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}",
"!(str = br.readLine()).equals(\"-\")",
"(str = br.readLine()).equals(\"-\")",
"(str = br.readLine()).equals",
"(str = br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"\"-\"",
"{\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}",
"StringBuilder sb = new StringBuilder(str);",
"sb",
"new StringBuilder(str)",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}",
"int h = Integer.parseInt(br.readLine());",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"sb.append(sb.toString().substring(0, h))",
"sb.append",
"sb",
"sb.toString().substring(0, h)",
"sb.toString().substring",
"sb.toString()",
"sb.toString",
"sb",
"0",
"h",
"sb.delete(0, h)",
"sb.delete",
"sb",
"0",
"h",
"System.out.println(sb.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.toString()",
"sb.toString",
"sb",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(!(str = br.readLine()).equals(\"-\")){\n\t\t\tStringBuilder sb = new StringBuilder(str);\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tsb.append(sb.toString().substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while(!(str = br.readLine()).equals("-")){
StringBuilder sb = new StringBuilder(str);
int n = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
int h = Integer.parseInt(br.readLine());
sb.append(sb.toString().substring(0, h));
sb.delete(0, h);
}
System.out.println(sb.toString());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
13,
0,
13,
20,
2,
13,
13,
41,
13,
17,
11,
1,
0,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
159,
5
],
[
159,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
38,
43
],
[
43,
44
],
[
32,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
32,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
32,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
67,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
67,
104
],
[
104,
105
],
[
104,
106
],
[
107,
108
],
[
107,
109
],
[
67,
110
],
[
110,
111
],
[
110,
112
],
[
67,
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
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
125,
134
],
[
134,
135
],
[
67,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
67,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
32,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
8,
153
],
[
153,
154
],
[
154,
155
],
[
6,
156
],
[
156,
157
],
[
0,
158
],
[
158,
159
],
[
158,
160
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tint i, j, m, h, length;\n\t\tString str1, str2;\n\t\tchar c1[], c2[];\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tint i, j, m, h, length;\n\t\tString str1, str2;\n\t\tchar c1[], c2[];\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tint i, j, m, h, length;\n\t\tString str1, str2;\n\t\tchar c1[], c2[];\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tint i, j, m, h, length;\n\t\tString str1, str2;\n\t\tchar c1[], c2[];\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}\n\t\tsc.close();\n\t}",
"int i",
"i",
"j",
"j",
"m",
"m",
"h",
"h",
"length;",
"length",
"String str1",
"str1",
"str2;",
"str2",
"char c1[]",
"c1",
"c2[];",
"c2",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}",
"true",
"{\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}",
"str1 = sc.next()",
"str1",
"sc.next()",
"sc.next",
"sc",
"if (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"str1.equals(\"-\")",
"str1.equals",
"str1",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"length = str1.length()",
"length",
"str1.length()",
"str1.length",
"str1",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < m",
"i",
"m",
"++i",
"++i",
"i",
"{\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}",
"{\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c1 = new char[h]",
"c1",
"new char[h]",
"h",
"for (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}",
"j = 0;",
"j = 0",
"j",
"0",
"j < h",
"j",
"h",
"++j",
"++j",
"j",
"{\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}",
"{\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}",
"c1[j] = str1.charAt(j)",
"c1[j]",
"c1",
"j",
"str1.charAt(j)",
"str1.charAt",
"str1",
"j",
"str2 = String.valueOf(c1)",
"str2",
"String.valueOf(c1)",
"String.valueOf",
"String",
"c1",
"c2 = new char[length - h]",
"c2",
"new char[length - h]",
"length - h",
"length",
"h",
"int k = 0;",
"k",
"0",
"for (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}",
"j = h;",
"j = h",
"j",
"h",
"j < length",
"j",
"length",
"++j",
"++j",
"j",
"{\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}",
"{\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}",
"c2[k] = str1.charAt(j)",
"c2[k]",
"c2",
"k",
"str1.charAt(j)",
"str1.charAt",
"str1",
"j",
"++k",
"k",
"str1 = String.valueOf(c2)",
"str1",
"String.valueOf(c2)",
"String.valueOf",
"String",
"c2",
"str1 = str1 + str2",
"str1",
"str1 + str2",
"str1",
"str2",
"System.out.println(str1)",
"System.out.println",
"System.out",
"System",
"System.out",
"str1",
"sc.close()",
"sc.close",
"sc",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tint i, j, m, h, length;\n\t\tString str1, str2;\n\t\tchar c1[], c2[];\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tint i, j, m, h, length;\n\t\tString str1, str2;\n\t\tchar c1[], c2[];\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tstr1 = sc.next();\n\t\t\tif (str1.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlength = str1.length();\n\t\t\tm = sc.nextInt();\n\t\t\tfor (i = 0; i < m; ++i) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tc1 = new char[h];\n\t\t\t\tfor (j = 0; j < h; ++j) {\n\t\t\t\t\tc1[j] = str1.charAt(j);\n\t\t\t\t}\n\t\t\t\tstr2 = String.valueOf(c1);\n\t\t\t\tc2 = new char[length - h];\n\t\t\t\tint k = 0;\n\t\t\t\tfor (j = h; j < length; ++j) {\n\t\t\t\t\tc2[k] = str1.charAt(j);\n\t\t\t\t\t++k;\n\t\t\t\t}\n\t\t\t\tstr1 = String.valueOf(c2);\n\t\t\t\tstr1 = str1 + str2;\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String args[]) {
int i, j, m, h, length;
String str1, str2;
char c1[], c2[];
Scanner sc = new Scanner(System.in);
while (true) {
str1 = sc.next();
if (str1.equals("-")) {
break;
}
length = str1.length();
m = sc.nextInt();
for (i = 0; i < m; ++i) {
h = sc.nextInt();
c1 = new char[h];
for (j = 0; j < h; ++j) {
c1[j] = str1.charAt(j);
}
str2 = String.valueOf(c1);
c2 = new char[length - h];
int k = 0;
for (j = h; j < length; ++j) {
c2[k] = str1.charAt(j);
++k;
}
str1 = String.valueOf(c2);
str1 = str1 + str2;
}
System.out.println(str1);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
11,
1,
30,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
17,
41,
13,
0,
13,
20,
17,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
41,
13,
4,
18,
13,
11,
1,
0,
13,
13,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
40,
13,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
40,
13,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
168,
5
],
[
168,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
15,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
21,
26
],
[
15,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
15,
33
],
[
33,
34
],
[
15,
35
],
[
35,
36
],
[
35,
37
],
[
15,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
15,
44
],
[
44,
45
],
[
15,
46
],
[
46,
47
],
[
15,
48
],
[
48,
49
],
[
15,
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
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
71,
81
],
[
81,
82
],
[
82,
83
],
[
71,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
62,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
62,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
115,
125
],
[
125,
126
],
[
126,
127
],
[
115,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
15,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
137,
147
],
[
147,
148
],
[
148,
149
],
[
137,
150
],
[
151,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
15,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
6,
165
],
[
165,
166
],
[
0,
167
],
[
167,
168
],
[
167,
169
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}\n\t}\n}\n\n\t\t\n\n\t",
"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\tfor(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"for(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
";",
"{\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"{\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"String x = scan.next();",
"x",
"scan.next()",
"scan.next",
"scan",
"if(x.equals(\"-\"))\n\t\t\tbreak;",
"x.equals(\"-\")",
"x.equals",
"x",
"\"-\"",
"break;",
"String sx[] = x.split(\"\");",
"sx",
"x.split(\"\")",
"x.split",
"x",
"\"\"",
"String[] a;",
"a",
"a = new String[10000]",
"a",
"new String[10000]",
"10000",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int i",
"i",
"t",
"t",
"c;",
"c",
"for(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}",
"{\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}",
"c = 0",
"c",
"0",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}",
"t = h;",
"t = h",
"t",
"h",
"t < x.length()",
"t",
"x.length()",
"x.length",
"x",
"t++",
"t++",
"t",
"{\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}",
"{\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}",
"a[c++] = sx[t]",
"a[c++]",
"a",
"c++",
"c",
"sx[t]",
"sx",
"t",
"for(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}",
"t = 0;",
"t = 0",
"t",
"0",
"t < h",
"t",
"h",
"t++",
"t++",
"t",
"{\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}",
"{\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}",
"a[c++] = sx[t]",
"a[c++]",
"a",
"c++",
"c",
"sx[t]",
"sx",
"t",
"for(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}",
"t = 0;",
"t = 0",
"t",
"0",
"t < x.length()",
"t",
"x.length()",
"x.length",
"x",
"t++",
"t++",
"t",
"{\n\t\t\t\tsx[t] = a[t];\n\t\t\t}",
"{\n\t\t\t\tsx[t] = a[t];\n\t\t\t}",
"sx[t] = a[t]",
"sx[t]",
"sx",
"t",
"a[t]",
"a",
"t",
"for(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}",
"t = 0;",
"t = 0",
"t",
"0",
"t < x.length()",
"t",
"x.length()",
"x.length",
"x",
"t++",
"t++",
"t",
"{\n\t\t\tSystem.out.print(sx[t]);\n\t\t}",
"{\n\t\t\tSystem.out.print(sx[t]);\n\t\t}",
"System.out.print(sx[t])",
"System.out.print",
"System.out",
"System",
"System.out",
"sx[t]",
"sx",
"t",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(;;){\n\t\tString x = scan.next();\n\t\tif(x.equals(\"-\"))\n\t\t\tbreak;\n\t\tString sx[] = x.split(\"\");\n\t\tString[] a;\n\t\ta = new String[10000];\n\t\tint m = scan.nextInt();\n\t\tint i,t,c;\n\t\tfor(i = 0; i < m; i++){\n\t\t\tc = 0;\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(t = h; t < x.length(); t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < h; t++){\n\t\t\t\ta[c++] = sx[t];\n\t\t\t}\n\t\t\tfor(t = 0; t < x.length(); t++){\n\t\t\t\tsx[t] = a[t];\n\t\t\t}\n\t\t}\n\t\tfor(t = 0; t < x.length(); t++){\n\t\t\tSystem.out.print(sx[t]);\n\t\t}\n\t\tSystem.out.println();\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
for(;;){
String x = scan.next();
if(x.equals("-"))
break;
String sx[] = x.split("");
String[] a;
a = new String[10000];
int m = scan.nextInt();
int i,t,c;
for(i = 0; i < m; i++){
c = 0;
int h = scan.nextInt();
for(t = h; t < x.length(); t++){
a[c++] = sx[t];
}
for(t = 0; t < h; t++){
a[c++] = sx[t];
}
for(t = 0; t < x.length(); t++){
sx[t] = a[t];
}
}
for(t = 0; t < x.length(); t++){
System.out.print(sx[t]);
}
System.out.println();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
0,
13,
17,
11,
1,
41,
13,
13,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
18,
13,
13,
30,
0,
13,
4,
18,
13,
18,
13,
2,
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
],
[
132,
11
],
[
132,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
31,
32
],
[
20,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
38,
40
],
[
20,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
20,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
20,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
64,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
64,
81
],
[
81,
82
],
[
81,
83
],
[
64,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
84,
94
],
[
94,
95
],
[
95,
96
],
[
84,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
109,
111
],
[
99,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
20,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
12,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
]
| [
"import java.io.*;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) throws IOException{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}\n\t}",
"main",
"{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"while(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}",
"true",
"{\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"if (line.equals(\"-\")) {break;}",
"line.equals(\"-\")",
"line.equals",
"line",
"\"-\"",
"{break;}",
"break;",
"int len = line.length();",
"len",
"line.length()",
"line.length",
"line",
"String word = line;",
"word",
"line",
"String hst = br.readLine();",
"hst",
"br.readLine()",
"br.readLine",
"br",
"int m = Integer.parseInt(hst);",
"m",
"Integer.parseInt(hst)",
"Integer.parseInt",
"Integer",
"hst",
"for (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}",
"{\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}",
"String st = br.readLine();",
"st",
"br.readLine()",
"br.readLine",
"br",
"int h = Integer.parseInt(st);",
"h",
"Integer.parseInt(st)",
"Integer.parseInt",
"Integer",
"st",
"char[] c = word.toCharArray();",
"c",
"word.toCharArray()",
"word.toCharArray",
"word",
"word = \"\"",
"word",
"\"\"",
"for (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"int j = h;",
"int j = h;",
"j",
"h",
"j < h+len",
"j",
"h+len",
"h",
"len",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"{\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"if(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}",
"j < len",
"j",
"len",
"{\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}",
"word += String.valueOf(c[j])",
"word",
"String.valueOf(c[j])",
"String.valueOf",
"String",
"c[j]",
"c",
"j",
"{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}",
"word += String.valueOf(c[j-len])",
"word",
"String.valueOf(c[j-len])",
"String.valueOf",
"String",
"c[j-len]",
"c",
"j-len",
"j",
"len",
"System.out.println(word)",
"System.out.println",
"System.out",
"System",
"System.out",
"word",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString line = br.readLine();\n\t\t\tif (line.equals(\"-\")) {break;}\n\t\t\tint len = line.length();\n\t\t\tString word = line;\n\t\t\tString hst = br.readLine();\n\t\t\tint m = Integer.parseInt(hst);\n\t\t\tfor (int i = 0; i<m ; i++) {\n\t\t\t\tString st = br.readLine();\n\t\t\t\tint h = Integer.parseInt(st);\n\t\t\t\tchar[] c = word.toCharArray();\n\t\t\t\tword = \"\";\n\t\t\t\t\n\t\t\t\tfor (int j = h; j < h+len ; j++ ) {\n\t\t\t\t\tif(j < len){\n\t\t\t\t\t\tword += String.valueOf(c[j]);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tword += String.valueOf(c[j-len]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\tSystem.out.println(word);\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String line = br.readLine();
if (line.equals("-")) {break;}
int len = line.length();
String word = line;
String hst = br.readLine();
int m = Integer.parseInt(hst);
for (int i = 0; i<m ; i++) {
String st = br.readLine();
int h = Integer.parseInt(st);
char[] c = word.toCharArray();
word = "";
for (int j = h; j < h+len ; j++ ) {
if(j < len){
word += String.valueOf(c[j]);
}else{
word += String.valueOf(c[j-len]);
}
}
}
System.out.println(word);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
4,
18,
18,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
82,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
9,
34
],
[
34,
35
],
[
82,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
38,
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
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
38,
77
],
[
77,
78
],
[
36,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main (String[] args){\n\t\twhile(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}\n\t}\n\tprivate static String shuffle(String order){\n\t\tint m=sc.nextInt();\n\t\tString str=order;\n\t\tfor(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}\n\t\treturn str;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main (String[] args){\n\t\twhile(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}\n\t}\n\tprivate static String shuffle(String order){\n\t\tint m=sc.nextInt();\n\t\tString str=order;\n\t\tfor(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}\n\t\treturn str;\n\t}\n}",
"Main",
"private static Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main (String[] args){\n\t\twhile(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}\n\t}",
"main",
"{\n\t\twhile(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}\n\t}",
"while(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}",
"true",
"{\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}",
"String order=sc.next();",
"order",
"sc.next()",
"sc.next",
"sc",
"if(order.equals(\"-\")) break;",
"order.equals(\"-\")",
"order.equals",
"order",
"\"-\"",
"break;",
"System.out.println(shuffle(order))",
"System.out.println",
"System.out",
"System",
"System.out",
"shuffle(order)",
"shuffle",
"order",
"String[] args",
"args",
"private static String shuffle(String order){\n\t\tint m=sc.nextInt();\n\t\tString str=order;\n\t\tfor(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}\n\t\treturn str;\n\t}",
"shuffle",
"{\n\t\tint m=sc.nextInt();\n\t\tString str=order;\n\t\tfor(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}\n\t\treturn str;\n\t}",
"int m=sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String str=order;",
"str",
"order",
"for(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}",
"{\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}",
"int h=sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"str=str.substring(h)+str.substring(0,h)",
"str",
"str.substring(h)+str.substring(0,h)",
"str.substring(h)",
"str.substring",
"str",
"h",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"return str;",
"str",
"String order",
"order",
"public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main (String[] args){\n\t\twhile(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}\n\t}\n\tprivate static String shuffle(String order){\n\t\tint m=sc.nextInt();\n\t\tString str=order;\n\t\tfor(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}\n\t\treturn str;\n\t}\n}",
"public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main (String[] args){\n\t\twhile(true){\n\t\t\tString order=sc.next();\n\t\t\tif(order.equals(\"-\")) break;\n\t\t\tSystem.out.println(shuffle(order));\n\t\t}\n\t}\n\tprivate static String shuffle(String order){\n\t\tint m=sc.nextInt();\n\t\tString str=order;\n\t\tfor(int i=0;i<m;i++){\n\t\t\tint h=sc.nextInt();\n\t\t\tstr=str.substring(h)+str.substring(0,h);\n\t\t}\n\t\treturn str;\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
private static Scanner sc=new Scanner(System.in);
public static void main (String[] args){
while(true){
String order=sc.next();
if(order.equals("-")) break;
System.out.println(shuffle(order));
}
}
private static String shuffle(String order){
int m=sc.nextInt();
String str=order;
for(int i=0;i<m;i++){
int h=sc.nextInt();
str=str.substring(h)+str.substring(0,h);
}
return str;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
29,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
23,
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
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
53,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
69,
73
],
[
23,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.Scanner;\n\n/**\n * Shuffle\n */\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str;\n int m,n = 0;\n while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str;\n int m,n = 0;\n while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str;\n int m,n = 0;\n while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n\n String str;\n int m,n = 0;\n while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String str;",
"str",
"int m",
"m",
"n = 0;",
"n",
"0",
"while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }",
"str = scan.next()",
"str",
"scan.next()",
"scan.next",
"scan",
"if (str.equals(\"-\")) {\n return;\n }",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n return;\n }",
"return;",
"m = scan.nextInt()",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }",
"{\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }",
"n = scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"str = str.substring(n, str.length())\n + str.substring(0, n)",
"str",
"str.substring(n, str.length())\n + str.substring(0, n)",
"str.substring(n, str.length())",
"str.substring",
"str",
"n",
"str.length()",
"str.length",
"str",
"str.substring(0, n)",
"str.substring",
"str",
"0",
"n",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str;\n int m,n = 0;\n while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String str;\n int m,n = 0;\n while (scan.hasNext()) {\n str = scan.next();\n if (str.equals(\"-\")) {\n return;\n }\n m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n = scan.nextInt();\n str = str.substring(n, str.length())\n + str.substring(0, n);\n }\n System.out.println(str);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
/**
* Shuffle
*/
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str;
int m,n = 0;
while (scan.hasNext()) {
str = scan.next();
if (str.equals("-")) {
return;
}
m = scan.nextInt();
for (int i = 0; i < m; i++) {
n = scan.nextInt();
str = str.substring(n, str.length())
+ str.substring(0, n);
}
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
4,
18,
13,
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
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
15,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
22,
30
],
[
30,
31
],
[
22,
32
],
[
32,
33
],
[
22,
34
],
[
34,
35
],
[
22,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
38,
45
],
[
36,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
46,
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
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
70,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
70,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
70,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
46,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
12,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\ttry {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\ttry {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"try {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t}",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String cards;",
"cards",
"String str;",
"str",
"int h;",
"h",
"String begin;",
"begin",
"String end;",
"end",
"while (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}",
"!(cards = reader.readLine()).equals(\"-\")",
"(cards = reader.readLine()).equals(\"-\")",
"(cards = reader.readLine()).equals",
"(cards = reader.readLine())",
"cards",
"reader.readLine()",
"reader.readLine",
"reader",
"\"-\"",
"{\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}",
"str = reader.readLine()",
"str",
"reader.readLine()",
"reader.readLine",
"reader",
"int m = Integer.parseInt(str);",
"m",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"for (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}",
"{\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}",
"str = reader.readLine()",
"str",
"reader.readLine()",
"reader.readLine",
"reader",
"h = Integer.parseInt(str)",
"h",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"begin = cards.substring(0, h)",
"begin",
"cards.substring(0, h)",
"cards.substring",
"cards",
"0",
"h",
"end = cards.substring(h, cards.length())",
"end",
"cards.substring(h, cards.length())",
"cards.substring",
"cards",
"h",
"cards.length()",
"cards.length",
"cards",
"cards = end.concat(begin)",
"cards",
"end.concat(begin)",
"end.concat",
"end",
"begin",
"System.out.println(cards)",
"System.out.println",
"System.out",
"System",
"System.out",
"cards",
"String[] args",
"args",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\ttry {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\ttry {\n\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString cards;\n\t\t\tString str;\n\t\t\tint h;\n\t\t\tString begin;\n\t\t\tString end;\n\t\t\twhile (!(cards = reader.readLine()).equals(\"-\")) {\n\t\t\t\tstr = reader.readLine(); \n\t\t\t\tint m = Integer.parseInt(str);\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tstr = reader.readLine();\n\t\t\t\t\th = Integer.parseInt(str);\n\t\t\t\t\tbegin = cards.substring(0, h);\n\t\t\t\t\tend = cards.substring(h, cards.length());\n\t\t\t\t\tcards = end.concat(begin);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(cards);\n\t\t\t}\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String cards;
String str;
int h;
String begin;
String end;
while (!(cards = reader.readLine()).equals("-")) {
str = reader.readLine();
int m = Integer.parseInt(str);
for (int i = 0; i < m; i++) {
str = reader.readLine();
h = Integer.parseInt(str);
begin = cards.substring(0, h);
end = cards.substring(h, cards.length());
cards = end.concat(begin);
}
System.out.println(cards);
}
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
41,
13,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
67,
5
],
[
67,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
46,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
38,
56
],
[
56,
57
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
6,
64
],
[
64,
65
],
[
0,
66
],
[
66,
67
],
[
66,
68
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }\n \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 while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }\n \n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }\n \n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }\n \n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }",
"true",
"{\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }",
"String s=sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if(s.equals(\"-\")) break;",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"break;",
"int tt=sc.nextInt();",
"tt",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String tmp=s;",
"tmp",
"s",
"while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }",
"tt>0",
"tt",
"0",
"{\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"tmp=tmp.substring(n)+tmp.substring(0,n)",
"tmp",
"tmp.substring(n)+tmp.substring(0,n)",
"tmp.substring(n)",
"tmp.substring",
"tmp",
"n",
"tmp.substring(0,n)",
"tmp.substring",
"tmp",
"0",
"n",
"tt--",
"tt",
"System.out.println(tmp)",
"System.out.println",
"System.out",
"System",
"System.out",
"tmp",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }\n \n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n while(true){\n String s=sc.next();\n if(s.equals(\"-\")) break;\n int tt=sc.nextInt();\n String tmp=s;\n while(tt>0){\n int n=sc.nextInt();\n \n tmp=tmp.substring(n)+tmp.substring(0,n);\n tt--;\n }\n System.out.println(tmp);\n }\n \n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(true){
String s=sc.next();
if(s.equals("-")) break;
int tt=sc.nextInt();
String tmp=s;
while(tt>0){
int n=sc.nextInt();
tmp=tmp.substring(n)+tmp.substring(0,n);
tt--;
}
System.out.println(tmp);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
11,
1,
30,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
4,
18,
4,
18,
13,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
6
],
[
6,
7
],
[
6,
8
],
[
100,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
18,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
18,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
18,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
18,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
48,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
48,
67
],
[
67,
68
],
[
67,
69
],
[
48,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
70,
76
],
[
48,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
18,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
11,
86
],
[
86,
87
],
[
86,
88
],
[
86,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
9,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}\n\n\t\tfor(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}\n\n\t\tfor(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"Main",
"private static final Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"public static void main(String[] args){\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}\n\n\t\tfor(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"main",
"{\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}\n\n\t\tfor(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"List<String> list = new ArrayList<String>();",
"list",
"new ArrayList<String>()",
"for(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}",
";",
"{\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}",
"{\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}",
"String input = scan.next();",
"input",
"scan.next()",
"scan.next",
"scan",
"if(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}",
"input.equals(\"-\")",
"input.equals",
"input",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}",
"{\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"String s = input.substring(0, m);",
"s",
"input.substring(0, m)",
"input.substring",
"input",
"0",
"m",
"String s2 = input.substring(m);",
"s2",
"input.substring(m)",
"input.substring",
"input",
"m",
"StringBuffer sb = new StringBuffer();",
"sb",
"new StringBuffer()",
"sb.append(s2).append(s)",
"sb.append(s2).append",
"sb.append(s2)",
"sb.append",
"sb",
"s2",
"s",
"input = sb.toString()",
"input",
"sb.toString()",
"sb.toString",
"sb",
"list.add(input)",
"list.add",
"list",
"input",
"for(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}",
"String s",
"list",
"{\n\t\t\tSystem.out.println(s);\n\t\t}",
"{\n\t\t\tSystem.out.println(s);\n\t\t}",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}\n\n\t\tfor(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor(;;){\n\t\t\tString input = scan.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint h = scan.nextInt();\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint m = scan.nextInt();\n\t\t\t\tString s = input.substring(0, m);\n\t\t\t\tString s2 = input.substring(m);\n\t \t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tsb.append(s2).append(s);\n\t\t\t\tinput = sb.toString();\n\t\t\t}\n\t\t\tlist.add(input);\n\t\t}\n\n\t\tfor(String s : list){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<String> list = new ArrayList<String>();
for(;;){
String input = scan.next();
if(input.equals("-")){
break;
}
int h = scan.nextInt();
for(int i = 0; i < h; i++){
int m = scan.nextInt();
String s = input.substring(0, m);
String s2 = input.substring(m);
StringBuffer sb = new StringBuffer();
sb.append(s2).append(s);
input = sb.toString();
}
list.add(input);
}
for(String s : list){
System.out.println(s);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
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,
4,
18,
13,
17,
13,
4,
18,
13,
17,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
46,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
60,
64
],
[
14,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
6,
71
],
[
71,
72
]
]
| [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner in = new Scanner(System.in);\n while(true){\n \t\tString s=in.next();\n \t\tif(s.equals(\"-\"))break;\n int k=in.nextInt();\n \t\tStringBuilder sb = new StringBuilder(s);\n for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }\n System.out.println(sb);\n }\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner in = new Scanner(System.in);\n while(true){\n \t\tString s=in.next();\n \t\tif(s.equals(\"-\"))break;\n int k=in.nextInt();\n \t\tStringBuilder sb = new StringBuilder(s);\n for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }\n System.out.println(sb);\n }\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner in = new Scanner(System.in);\n while(true){\n \t\tString s=in.next();\n \t\tif(s.equals(\"-\"))break;\n int k=in.nextInt();\n \t\tStringBuilder sb = new StringBuilder(s);\n for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }\n System.out.println(sb);\n }\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n while(true){\n \t\tString s=in.next();\n \t\tif(s.equals(\"-\"))break;\n int k=in.nextInt();\n \t\tStringBuilder sb = new StringBuilder(s);\n for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }\n System.out.println(sb);\n }\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"while(true){\n \t\tString s=in.next();\n \t\tif(s.equals(\"-\"))break;\n int k=in.nextInt();\n \t\tStringBuilder sb = new StringBuilder(s);\n for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }\n System.out.println(sb);\n }",
"true",
"{\n \t\tString s=in.next();\n \t\tif(s.equals(\"-\"))break;\n int k=in.nextInt();\n \t\tStringBuilder sb = new StringBuilder(s);\n for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }\n System.out.println(sb);\n }",
"String s=in.next();",
"s",
"in.next()",
"in.next",
"in",
"if(s.equals(\"-\"))break;",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"break;",
"int k=in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"StringBuilder sb = new StringBuilder(s);",
"sb",
"new StringBuilder(s)",
"for(int i=0;i<k;i++){\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }",
"{\n int h=in.nextInt();\n sb.append(sb.substring(0,h));\n sb.delete(0, h);\n }",
"int h=in.nextInt();",
"h",
"in.nextInt()",
"in.nextInt",
"in",
"sb.append(sb.substring(0,h))",
"sb.append",
"sb",
"sb.substring(0,h)",
"sb.substring",
"sb",
"0",
"h",
"sb.delete(0, h)",
"sb.delete",
"sb",
"0",
"h",
"System.out.println(sb)",
"System.out.println",
"System.out",
"System",
"System.out",
"sb",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
while(true){
String s=in.next();
if(s.equals("-"))break;
int k=in.nextInt();
StringBuilder sb = new StringBuilder(s);
for(int i=0;i<k;i++){
int h=in.nextInt();
sb.append(sb.substring(0,h));
sb.delete(0, h);
}
System.out.println(sb);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
13,
3,
38,
5,
13,
30,
14,
2,
13,
17,
30,
0,
13,
13,
30,
4,
18,
18,
13,
13,
13,
0,
13,
13,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
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
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
21,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
36,
43
],
[
25,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
56,
63
],
[
63,
64
],
[
63,
65
],
[
47,
66
],
[
66,
67
],
[
67,
68
],
[
44,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
69,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
11,
91
],
[
91,
92
],
[
92,
93
],
[
9,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
]
| [
"import java.io.*;\nimport java.util.*;\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); \n\t\tString card = \"\";\n\t\tInteger shaffle_time = 0;\n\t\twhile(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); \n\t\tString card = \"\";\n\t\tInteger shaffle_time = 0;\n\t\twhile(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); \n\t\tString card = \"\";\n\t\tInteger shaffle_time = 0;\n\t\twhile(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}",
"main",
"{\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); \n\t\tString card = \"\";\n\t\tInteger shaffle_time = 0;\n\t\twhile(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}",
"Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));",
"s",
"new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"String card = \"\";",
"card",
"\"\"",
"Integer shaffle_time = 0;",
"shaffle_time",
"0",
"while(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}",
"s.hasNext()",
"s.hasNext",
"s",
"{\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}",
"String input = s.next();",
"input",
"s.next()",
"s.next",
"s",
"if(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}",
"input.equals(\"-\")",
"input.equals",
"input",
"\"-\"",
"{\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}",
"System.out.println(card)",
"System.out.println",
"System.out",
"System",
"System.out",
"card",
"break;",
"try{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}",
"catch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}",
"NumberFormatException e",
"{\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}",
"if(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}",
"card == \"\"",
"card",
"\"\"",
"{\n\t\t\t\t\tcard = input;\n\t\t\t\t}",
"card = input",
"card",
"input",
"{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}",
"System.out.println(card)",
"System.out.println",
"System.out",
"System",
"System.out",
"card",
"card = input",
"card",
"input",
"s.next()",
"s.next",
"s",
"{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}",
"shaffle_time = Integer.parseInt(input)",
"shaffle_time",
"Integer.parseInt(input)",
"Integer.parseInt",
"Integer",
"input",
"card = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time)",
"card",
"card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time)",
"card.substring(shaffle_time, card.length())",
"card.substring",
"card",
"shaffle_time",
"card.length()",
"card.length",
"card",
"card.substring(0, shaffle_time)",
"card.substring",
"card",
"0",
"shaffle_time",
"s.close()",
"s.close",
"s",
"String[] args",
"args",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); \n\t\tString card = \"\";\n\t\tInteger shaffle_time = 0;\n\t\twhile(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}\n}",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); \n\t\tString card = \"\";\n\t\tInteger shaffle_time = 0;\n\t\twhile(s.hasNext()){\n\t\t\tString input = s.next();\n\t\t\tif(input.equals(\"-\")){\n\t\t\t\tSystem.out.println(card);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tshaffle_time = Integer.parseInt(input);\n\t\t\t\tcard = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);\n\t\t\t}\n\t\t\tcatch(NumberFormatException e){\n\t\t\t\tif(card == \"\"){\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t\tcard = input;\n\t\t\t\t}\n\t\t\t\ts.next();\n\t\t\t}\n\t\t}\n\t\ts.close();\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
String card = "";
Integer shaffle_time = 0;
while(s.hasNext()){
String input = s.next();
if(input.equals("-")){
System.out.println(card);
break;
}
try{
shaffle_time = Integer.parseInt(input);
card = card.substring(shaffle_time, card.length()) + card.substring(0, shaffle_time);
}
catch(NumberFormatException e){
if(card == ""){
card = input;
}
else{
System.out.println(card);
card = input;
}
s.next();
}
}
s.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
17,
3,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
0,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
101,
5
],
[
101,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
29,
36
],
[
23,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
23,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
23,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
60,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
23,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
23,
95
],
[
95,
96
],
[
95,
97
],
[
6,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] aa){\n Scanner s = new Scanner(System.in);\n String st;\n \n int i,now=0,m;\n while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }\n } \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] aa){\n Scanner s = new Scanner(System.in);\n String st;\n \n int i,now=0,m;\n while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }\n } \n}",
"Main",
"public static void main(String[] aa){\n Scanner s = new Scanner(System.in);\n String st;\n \n int i,now=0,m;\n while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n String st;\n \n int i,now=0,m;\n while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"String st;",
"st",
"int i",
"i",
"now=0",
"now",
"0",
"m;",
"m",
"while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }",
"true",
"{\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }",
"st = s.next()",
"st",
"s.next()",
"s.next",
"s",
"if(st.charAt(0)=='-')break;",
"st.charAt(0)=='-'",
"st.charAt(0)",
"st.charAt",
"st",
"0",
"'-'",
"break;",
"m =s.nextInt()",
"m",
"s.nextInt()",
"s.nextInt",
"s",
"for(i=0;i<m;i++){\n now+=s.nextInt();\n }",
"i=0;",
"i=0",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n now+=s.nextInt();\n }",
"{\n now+=s.nextInt();\n }",
"now+=s.nextInt()",
"now",
"s.nextInt()",
"s.nextInt",
"s",
"for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }",
"i=0;",
"i=0",
"i",
"0",
"i<st.length()",
"i",
"st.length()",
"st.length",
"st",
"i++",
"i++",
"i",
"{\n System.out.print(st.charAt((now+i)%st.length()));\n }",
"{\n System.out.print(st.charAt((now+i)%st.length()));\n }",
"System.out.print(st.charAt((now+i)%st.length()))",
"System.out.print",
"System.out",
"System",
"System.out",
"st.charAt((now+i)%st.length())",
"st.charAt",
"st",
"(now+i)%st.length()",
"(now+i)",
"now",
"i",
"st.length()",
"st.length",
"st",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"now=0",
"now",
"0",
"String[] aa",
"aa",
"public class Main{\n public static void main(String[] aa){\n Scanner s = new Scanner(System.in);\n String st;\n \n int i,now=0,m;\n while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }\n } \n}",
"public class Main{\n public static void main(String[] aa){\n Scanner s = new Scanner(System.in);\n String st;\n \n int i,now=0,m;\n while(true){\n st = s.next();\n if(st.charAt(0)=='-')break;\n m =s.nextInt();\n for(i=0;i<m;i++){\n now+=s.nextInt();\n }\n for(i=0;i<st.length();i++){\n System.out.print(st.charAt((now+i)%st.length()));\n }\n System.out.println();\n now=0;\n }\n } \n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] aa){
Scanner s = new Scanner(System.in);
String st;
int i,now=0,m;
while(true){
st = s.next();
if(st.charAt(0)=='-')break;
m =s.nextInt();
for(i=0;i<m;i++){
now+=s.nextInt();
}
for(i=0;i<st.length();i++){
System.out.print(st.charAt((now+i)%st.length()));
}
System.out.println();
now=0;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
29,
5
],
[
29,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
6,
26
],
[
26,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
]
]
| [
"import java.io.*;\n\npublic class Main{\n public static void main(String[] args) throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = new String();\n String line2,line3;\n String cut,rem;\n String result = new String();\nouter:\n while(true){\n\n line=reader.readLine();\n if(line.equals(\"-\")){\n break outer;\n }\n int len = line.length();\n \n line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n result = line;\n for(int j = 0;j < m;j++){\n \n line3 = reader.readLine();\n int h = Integer.parseInt(line3);\n cut = result.substring(h);\n rem = result.substring(0,h);\n result = cut+rem;\n }\n\n \n System.out.println(result);\n }\n }\n }\n\n\n",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n public static void main(String[] args) throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = new String();\n String line2,line3;\n String cut,rem;\n String result = new String();\nouter:\n while(true){\n\n line=reader.readLine();\n if(line.equals(\"-\")){\n break outer;\n }\n int len = line.length();\n \n line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n result = line;\n for(int j = 0;j < m;j++){\n \n line3 = reader.readLine();\n int h = Integer.parseInt(line3);\n cut = result.substring(h);\n rem = result.substring(0,h);\n result = cut+rem;\n }\n\n \n System.out.println(result);\n }\n }\n }",
"Main",
"public static void main(String[] args) throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = new String();\n String line2,line3;\n String cut,rem;\n String result = new String();\nouter:\n while(true){\n\n line=reader.readLine();\n if(line.equals(\"-\")){\n break outer;\n }\n int len = line.length();\n \n line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n result = line;\n for(int j = 0;j < m;j++){\n \n line3 = reader.readLine();\n int h = Integer.parseInt(line3);\n cut = result.substring(h);\n rem = result.substring(0,h);\n result = cut+rem;\n }\n\n \n System.out.println(result);\n }\n }",
"main",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = new String();\n String line2,line3;\n String cut,rem;\n String result = new String();\nouter:\n while(true){\n\n line=reader.readLine();\n if(line.equals(\"-\")){\n break outer;\n }\n int len = line.length();\n \n line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n result = line;\n for(int j = 0;j < m;j++){\n \n line3 = reader.readLine();\n int h = Integer.parseInt(line3);\n cut = result.substring(h);\n rem = result.substring(0,h);\n result = cut+rem;\n }\n\n \n System.out.println(result);\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String line = new String();",
"line",
"new String()",
"String line2",
"line2",
"line3;",
"line3",
"String cut",
"cut",
"rem;",
"rem",
"String result = new String();",
"result",
"new String()",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = new String();\n String line2,line3;\n String cut,rem;\n String result = new String();\nouter:\n while(true){\n\n line=reader.readLine();\n if(line.equals(\"-\")){\n break outer;\n }\n int len = line.length();\n \n line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n result = line;\n for(int j = 0;j < m;j++){\n \n line3 = reader.readLine();\n int h = Integer.parseInt(line3);\n cut = result.substring(h);\n rem = result.substring(0,h);\n result = cut+rem;\n }\n\n \n System.out.println(result);\n }\n }\n }",
"public class Main{\n public static void main(String[] args) throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = new String();\n String line2,line3;\n String cut,rem;\n String result = new String();\nouter:\n while(true){\n\n line=reader.readLine();\n if(line.equals(\"-\")){\n break outer;\n }\n int len = line.length();\n \n line2 = reader.readLine();\n int m = Integer.parseInt(line2);\n result = line;\n for(int j = 0;j < m;j++){\n \n line3 = reader.readLine();\n int h = Integer.parseInt(line3);\n cut = result.substring(h);\n rem = result.substring(0,h);\n result = cut+rem;\n }\n\n \n System.out.println(result);\n }\n }\n }",
"Main"
]
| import java.io.*;
public class Main{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line = new String();
String line2,line3;
String cut,rem;
String result = new String();
outer:
while(true){
line=reader.readLine();
if(line.equals("-")){
break outer;
}
int len = line.length();
line2 = reader.readLine();
int m = Integer.parseInt(line2);
result = line;
for(int j = 0;j < m;j++){
line3 = reader.readLine();
int h = Integer.parseInt(line3);
cut = result.substring(h);
rem = result.substring(0,h);
result = cut+rem;
}
System.out.println(result);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
13,
4,
18,
13,
17,
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
],
[
89,
11
],
[
89,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
31,
32
],
[
20,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
20,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
12,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"while (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}",
"true",
"{\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}",
"String cards = in.readLine();",
"cards",
"in.readLine()",
"in.readLine",
"in",
"if (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"cards.equals(\"-\")",
"cards.equals",
"cards",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int num = cards.length();",
"num",
"cards.length()",
"cards.length",
"cards",
"int time = Integer.parseInt(in.readLine());",
"time",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"for (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < time",
"i",
"time",
"i++",
"i++",
"i",
"{\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}",
"{\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}",
"int shuffle = Integer.parseInt(in.readLine());",
"shuffle",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"cards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle)",
"cards",
"cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle)",
"cards.substring(shuffle, num)",
"cards.substring",
"cards",
"shuffle",
"num",
"cards.substring(0, shuffle)",
"cards.substring",
"cards",
"0",
"shuffle",
"System.out.println(cards)",
"System.out.println",
"System.out",
"System",
"System.out",
"cards",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString cards = in.readLine();\n\t\t\tif (cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num = cards.length();\n\t\t\tint time = Integer.parseInt(in.readLine());\n\t\t\tfor (int i = 0; i < time; i++) {\n\t\t\t\tint shuffle = Integer.parseInt(in.readLine());\n\n\t\t\t\tcards = cards.substring(shuffle, num)\n\t\t\t\t\t\t+ cards.substring(0, shuffle);\n\t\t\t}\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String cards = in.readLine();
if (cards.equals("-")) {
break;
}
int num = cards.length();
int time = Integer.parseInt(in.readLine());
for (int i = 0; i < time; i++) {
int shuffle = Integer.parseInt(in.readLine());
cards = cards.substring(shuffle, num)
+ cards.substring(0, shuffle);
}
System.out.println(cards);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
2,
17,
17,
30,
41,
13,
4,
18,
13,
41,
13,
20,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
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
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
16,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
25,
30
],
[
16,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
16,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
48,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
16,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
6,
76
],
[
76,
77
]
]
| [
"import java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args) \t{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(0 < 1) {\n\t\t\tString str = sc.next();\n\t\t\tStringBuffer strbf = new StringBuffer(str);\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint shuffle = sc.nextInt();\n\t\t\tfor(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}\n\t\t\tSystem.out.println(strbf);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args) \t{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(0 < 1) {\n\t\t\tString str = sc.next();\n\t\t\tStringBuffer strbf = new StringBuffer(str);\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint shuffle = sc.nextInt();\n\t\t\tfor(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}\n\t\t\tSystem.out.println(strbf);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) \t{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(0 < 1) {\n\t\t\tString str = sc.next();\n\t\t\tStringBuffer strbf = new StringBuffer(str);\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint shuffle = sc.nextInt();\n\t\t\tfor(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}\n\t\t\tSystem.out.println(strbf);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(0 < 1) {\n\t\t\tString str = sc.next();\n\t\t\tStringBuffer strbf = new StringBuffer(str);\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint shuffle = sc.nextInt();\n\t\t\tfor(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}\n\t\t\tSystem.out.println(strbf);\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(0 < 1) {\n\t\t\tString str = sc.next();\n\t\t\tStringBuffer strbf = new StringBuffer(str);\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint shuffle = sc.nextInt();\n\t\t\tfor(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}\n\t\t\tSystem.out.println(strbf);\n\t\t}",
"0 < 1",
"0",
"1",
"{\n\t\t\tString str = sc.next();\n\t\t\tStringBuffer strbf = new StringBuffer(str);\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint shuffle = sc.nextInt();\n\t\t\tfor(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}\n\t\t\tSystem.out.println(strbf);\n\t\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"StringBuffer strbf = new StringBuffer(str);",
"strbf",
"new StringBuffer(str)",
"if(str.equals(\"-\")) break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int shuffle = sc.nextInt();",
"shuffle",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0;i < shuffle;i++) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < shuffle",
"i",
"shuffle",
"i++",
"i++",
"i",
"{\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}",
"{\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tstrbf.append(strbf.substring(0,num));\n\t\t\t\t//System.out.println(strbf);\n\t\t\t\tstrbf.delete(0, num);\n\t\t\t\t//System.out.println(strbf);\n\t\t\t}",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"strbf.append(strbf.substring(0,num))",
"strbf.append",
"strbf",
"strbf.substring(0,num)",
"strbf.substring",
"strbf",
"0",
"num",
"strbf.delete(0, num)",
"strbf.delete",
"strbf",
"0",
"num",
"System.out.println(strbf)",
"System.out.println",
"System.out",
"System",
"System.out",
"strbf",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(0 < 1) {
String str = sc.next();
StringBuffer strbf = new StringBuffer(str);
if(str.equals("-")) break;
int shuffle = sc.nextInt();
for(int i = 0;i < shuffle;i++) {
int num = sc.nextInt();
strbf.append(strbf.substring(0,num));
//System.out.println(strbf);
strbf.delete(0, num);
//System.out.println(strbf);
}
System.out.println(strbf);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
20,
14,
4,
18,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
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
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
25,
30
],
[
24,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
20,
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
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
52,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
52,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
20,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
12,
83
],
[
83,
84
]
]
| [
"import java.io.*;\nimport java.util.*;\nimport java.lang.*;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n Scanner scan=new Scanner(System.in);\n\n while(true){\n StringBuilder sb=new StringBuilder(scan.next());\n if(sb.toString().equals(\"-\"))break;\n int m=Integer.parseInt(scan.next());\n for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }\n System.out.println(sb);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"class Main{\n public static void main(String[] args) throws IOException{\n Scanner scan=new Scanner(System.in);\n\n while(true){\n StringBuilder sb=new StringBuilder(scan.next());\n if(sb.toString().equals(\"-\"))break;\n int m=Integer.parseInt(scan.next());\n for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }\n System.out.println(sb);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n Scanner scan=new Scanner(System.in);\n\n while(true){\n StringBuilder sb=new StringBuilder(scan.next());\n if(sb.toString().equals(\"-\"))break;\n int m=Integer.parseInt(scan.next());\n for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }\n System.out.println(sb);\n }\n }",
"main",
"{\n Scanner scan=new Scanner(System.in);\n\n while(true){\n StringBuilder sb=new StringBuilder(scan.next());\n if(sb.toString().equals(\"-\"))break;\n int m=Integer.parseInt(scan.next());\n for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }\n System.out.println(sb);\n }\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(true){\n StringBuilder sb=new StringBuilder(scan.next());\n if(sb.toString().equals(\"-\"))break;\n int m=Integer.parseInt(scan.next());\n for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }\n System.out.println(sb);\n }",
"true",
"{\n StringBuilder sb=new StringBuilder(scan.next());\n if(sb.toString().equals(\"-\"))break;\n int m=Integer.parseInt(scan.next());\n for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }\n System.out.println(sb);\n }",
"StringBuilder sb=new StringBuilder(scan.next());",
"sb",
"new StringBuilder(scan.next())",
"if(sb.toString().equals(\"-\"))break;",
"sb.toString().equals(\"-\")",
"sb.toString().equals",
"sb.toString()",
"sb.toString",
"sb",
"\"-\"",
"break;",
"int m=Integer.parseInt(scan.next());",
"m",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"for(int i=0;i<m;i++){\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }",
"{\n int h=Integer.parseInt(scan.next());\n String buf=sb.substring(0,h);\n sb.delete(0,h);\n sb.append(buf);\n }",
"int h=Integer.parseInt(scan.next());",
"h",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"String buf=sb.substring(0,h);",
"buf",
"sb.substring(0,h)",
"sb.substring",
"sb",
"0",
"h",
"sb.delete(0,h)",
"sb.delete",
"sb",
"0",
"h",
"sb.append(buf)",
"sb.append",
"sb",
"buf",
"System.out.println(sb)",
"System.out.println",
"System.out",
"System",
"System.out",
"sb",
"String[] args",
"args"
]
| import java.io.*;
import java.util.*;
import java.lang.*;
class Main{
public static void main(String[] args) throws IOException{
Scanner scan=new Scanner(System.in);
while(true){
StringBuilder sb=new StringBuilder(scan.next());
if(sb.toString().equals("-"))break;
int m=Integer.parseInt(scan.next());
for(int i=0;i<m;i++){
int h=Integer.parseInt(scan.next());
String buf=sb.substring(0,h);
sb.delete(0,h);
sb.append(buf);
}
System.out.println(sb);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
53,
54
],
[
46,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
14,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.io.*;\n\npublic class Main{\n\tpublic static void main(String[] arsg) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n\tpublic static void main(String[] arsg) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] arsg) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"while(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}",
"true",
"{\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}",
"String str = br.readLine();",
"str",
"br.readLine()",
"br.readLine",
"br",
"if(str.equals(\"-\")) break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}",
"int h = Integer.parseInt(br.readLine());",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"str = str.substring(h, str.length()) + str.substring(0,h)",
"str",
"str.substring(h, str.length()) + str.substring(0,h)",
"str.substring(h, str.length())",
"str.substring",
"str",
"h",
"str.length()",
"str.length",
"str",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] arsg",
"arsg",
"public class Main{\n\tpublic static void main(String[] arsg) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] arsg) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tif(str.equals(\"-\")) break;\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tfor(int i = 0;i<n;i++){\n\t\t\t\tint h = Integer.parseInt(br.readLine());\n\t\t\t\tstr = str.substring(h, str.length()) + str.substring(0,h);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
public class Main{
public static void main(String[] arsg) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String str = br.readLine();
if(str.equals("-")) break;
int n = Integer.parseInt(br.readLine());
for(int i = 0;i<n;i++){
int h = Integer.parseInt(br.readLine());
str = str.substring(h, str.length()) + str.substring(0,h);
}
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
29,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
44,
47
],
[
14,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
6,
54
],
[
54,
55
],
[
75,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
60,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
56,
70
],
[
70,
71
],
[
56,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }\n\n }\n private static String shuffle(String cards, int h) {\n return cards.substring(h) + cards.substring(0, h);\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }\n\n }\n private static String shuffle(String cards, int h) {\n return cards.substring(h) + cards.substring(0, h);\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }\n\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n\n while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }",
"true",
"{\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }",
"String cards = sc.next();",
"cards",
"sc.next()",
"sc.next",
"sc",
"if (cards.equals(\"-\"))\n break;",
"cards.equals(\"-\")",
"cards.equals",
"cards",
"\"-\"",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }",
"m-- > 0",
"m--",
"m",
"0",
"{\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"cards = shuffle(cards, h)",
"cards",
"shuffle(cards, h)",
"shuffle",
"cards",
"h",
"System.out.println(cards)",
"System.out.println",
"System.out",
"System",
"System.out",
"cards",
"String[] args",
"args",
"private static String shuffle(String cards, int h) {\n return cards.substring(h) + cards.substring(0, h);\n }",
"shuffle",
"{\n return cards.substring(h) + cards.substring(0, h);\n }",
"return cards.substring(h) + cards.substring(0, h);",
"cards.substring(h) + cards.substring(0, h)",
"cards.substring(h)",
"cards.substring",
"cards",
"h",
"cards.substring(0, h)",
"cards.substring",
"cards",
"0",
"h",
"String cards",
"cards",
"int h",
"h",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }\n\n }\n private static String shuffle(String cards, int h) {\n return cards.substring(h) + cards.substring(0, h);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n while (true) {\n String cards = sc.next();\n\n if (cards.equals(\"-\"))\n break;\n\n int m = sc.nextInt();\n \n while (m-- > 0) {\n int h = sc.nextInt();\n cards = shuffle(cards, h);\n }\n\n System.out.println(cards);\n }\n\n }\n private static String shuffle(String cards, int h) {\n return cards.substring(h) + cards.substring(0, h);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String cards = sc.next();
if (cards.equals("-"))
break;
int m = sc.nextInt();
while (m-- > 0) {
int h = sc.nextInt();
cards = shuffle(cards, h);
}
System.out.println(cards);
}
}
private static String shuffle(String cards, int h) {
return cards.substring(h) + cards.substring(0, h);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
14,
2,
18,
13,
17,
17,
3,
41,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
2,
13,
13,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
2,
13,
13,
13,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
17,
18,
13,
13,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
178,
5
],
[
178,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
14,
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
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
14,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
14,
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
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
101,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
120,
121
],
[
120,
122
],
[
82,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
123,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
136,
144
],
[
144,
145
],
[
144,
146
],
[
14,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
147,
155
],
[
155,
156
],
[
156,
157
],
[
147,
158
],
[
159,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
160,
165
],
[
160,
166
],
[
166,
167
],
[
166,
168
],
[
14,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
169,
174
],
[
6,
175
],
[
175,
176
],
[
0,
177
],
[
177,
178
],
[
177,
179
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }\n }\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 while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }",
"true",
"{\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }",
"String Cards = sc.next();",
"Cards",
"sc.next()",
"sc.next",
"sc",
"int i",
"i",
"j;",
"j",
"int l = Cards.length();",
"l",
"Cards.length()",
"Cards.length",
"Cards",
"char w[] = new char[l];",
"w",
"new char[l]",
"l",
"char R[] = new char[l];",
"R",
"new char[l]",
"l",
"for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < l",
"i",
"l",
"i++",
"i++",
"i",
"{\n w[i] = Cards.charAt(i);\n }",
"{\n w[i] = Cards.charAt(i);\n }",
"w[i] = Cards.charAt(i)",
"w[i]",
"w",
"i",
"Cards.charAt(i)",
"Cards.charAt",
"Cards",
"i",
"if(w[0] == '-') break;",
"w[0] == '-'",
"w[0]",
"w",
"0",
"'-'",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }",
"{\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }",
"j = 0;",
"j = 0",
"j",
"0",
"j < l",
"j",
"l",
"j++",
"j++",
"j",
"{\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }",
"{\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }",
"if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }",
"j < h",
"j",
"h",
"{\n R[j] = w[j];\n }",
"R[j] = w[j]",
"R[j]",
"R",
"j",
"w[j]",
"w",
"j",
"{\n w[j - h] = w[j];\n }",
"w[j - h] = w[j]",
"w[j - h]",
"w",
"j - h",
"j",
"h",
"w[j]",
"w",
"j",
"for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }",
"j = 0;",
"j = 0",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n w[l - h + j] = R[j];\n }",
"{\n w[l - h + j] = R[j];\n }",
"w[l - h + j] = R[j]",
"w[l - h + j]",
"w",
"l - h + j",
"l - h",
"l",
"h",
"j",
"R[j]",
"R",
"j",
"for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < l",
"i",
"l",
"i++",
"i++",
"i",
"{\n System.out.printf(\"%c\", w[i]);\n }",
"{\n System.out.printf(\"%c\", w[i]);\n }",
"System.out.printf(\"%c\", w[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%c\"",
"w[i]",
"w",
"i",
"System.out.printf(\"\\n\")",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"\\n\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n String Cards = sc.next();\n int i, j;\n int l = Cards.length();\n char w[] = new char[l];\n char R[] = new char[l];\n for (i = 0; i < l; i++) {\n w[i] = Cards.charAt(i);\n }\n if(w[0] == '-') break;\n int m = sc.nextInt();\n for (i = 0; i < m; i++) {\n int h = sc.nextInt();\n for (j = 0; j < l; j++) {\n if (j < h) {\n R[j] = w[j];\n } else {\n w[j - h] = w[j];\n }\n }\n for (j = 0; j < h; j++) {\n w[l - h + j] = R[j];\n }\n }\n for (i = 0; i < l; i++) {\n System.out.printf(\"%c\", w[i]);\n }\n System.out.printf(\"\\n\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(true) {
String Cards = sc.next();
int i, j;
int l = Cards.length();
char w[] = new char[l];
char R[] = new char[l];
for (i = 0; i < l; i++) {
w[i] = Cards.charAt(i);
}
if(w[0] == '-') break;
int m = sc.nextInt();
for (i = 0; i < m; i++) {
int h = sc.nextInt();
for (j = 0; j < l; j++) {
if (j < h) {
R[j] = w[j];
} else {
w[j - h] = w[j];
}
}
for (j = 0; j < h; j++) {
w[l - h + j] = R[j];
}
}
for (i = 0; i < l; i++) {
System.out.printf("%c", w[i]);
}
System.out.printf("\n");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
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
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
20,
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
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
52,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
52,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
20,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
9,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }\n\t}\n\n}",
"Main",
"public static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }\n\t}",
"main",
"{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }\n\t}",
"InputStreamReader isr = new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(isr);",
"br",
"new BufferedReader(isr)",
"while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }",
"true",
"{\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }",
"String mojiretu = br.readLine();",
"mojiretu",
"br.readLine()",
"br.readLine",
"br",
"if (mojiretu.equals(\"-\"))\n \t\tbreak;",
"mojiretu.equals(\"-\")",
"mojiretu.equals",
"mojiretu",
"\"-\"",
"break;",
"int kaisu = Integer.parseInt(br.readLine());",
"kaisu",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < kaisu",
"i",
"kaisu",
"i++",
"i++",
"i",
"{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}",
"{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}",
"int shaffle = Integer.parseInt(br.readLine());",
"shaffle",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String cut = mojiretu.substring(0, shaffle);",
"cut",
"mojiretu.substring(0, shaffle)",
"mojiretu.substring",
"mojiretu",
"0",
"shaffle",
"String nokori = mojiretu.substring(shaffle);",
"nokori",
"mojiretu.substring(shaffle)",
"mojiretu.substring",
"mojiretu",
"shaffle",
"mojiretu = nokori + cut",
"mojiretu",
"nokori + cut",
"nokori",
"cut",
"System.out.println(mojiretu)",
"System.out.println",
"System.out",
"System",
"System.out",
"mojiretu",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString mojiretu = br.readLine();\n \tif (mojiretu.equals(\"-\"))\n \t\tbreak;\n \tint kaisu = Integer.parseInt(br.readLine());\n \tfor (int i = 0; i < kaisu; i++)\n \t{\n \t\tint shaffle = Integer.parseInt(br.readLine());\n \t\tString cut = mojiretu.substring(0, shaffle);\n \t\tString nokori = mojiretu.substring(shaffle);\n \t\tmojiretu = nokori + cut;\n \t}\n \tSystem.out.println(mojiretu);\n }\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)throws Exception{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
while (true)
{
String mojiretu = br.readLine();
if (mojiretu.equals("-"))
break;
int kaisu = Integer.parseInt(br.readLine());
for (int i = 0; i < kaisu; i++)
{
int shaffle = Integer.parseInt(br.readLine());
String cut = mojiretu.substring(0, shaffle);
String nokori = mojiretu.substring(shaffle);
mojiretu = nokori + cut;
}
System.out.println(mojiretu);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
4,
18,
13,
14,
2,
2,
18,
13,
13,
17,
2,
18,
13,
17,
17,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
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,
18,
13,
13,
11,
1,
41,
13,
13,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
13,
18,
13,
13,
11,
1,
41,
13,
2,
18,
13,
13,
13,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
2,
13,
2,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
156,
5
],
[
156,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
6,
15
],
[
15,
16
],
[
156,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
34,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
33,
45
],
[
25,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
25,
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
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
63,
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
],
[
90,
91
],
[
90,
92
],
[
63,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
114,
116
],
[
63,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
117,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
117,
131
],
[
131,
132
],
[
132,
133
],
[
117,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
25,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
0,
155
],
[
155,
156
],
[
155,
157
]
]
| [
"import java.util.*;\n\npublic class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }",
"main",
"{\n Main main = new Main();\n main.solv();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.solv()",
"main.solv",
"main",
"String[] args",
"args",
"private void solv() {\n Scanner input = new Scanner(System.in);\n while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }\n }",
"solv",
"{\n Scanner input = new Scanner(System.in);\n while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }",
"true",
"{\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }",
"char[] cs = input.next().toCharArray();",
"cs",
"input.next().toCharArray()",
"input.next().toCharArray",
"input.next()",
"input.next",
"input",
"if (cs.length == 1 && cs[0] == '-') break;",
"cs.length == 1 && cs[0] == '-'",
"cs.length == 1",
"cs.length",
"cs",
"cs.length",
"1",
"cs[0] == '-'",
"cs[0]",
"cs",
"0",
"'-'",
"break;",
"int m = input.nextInt();",
"m",
"input.nextInt()",
"input.nextInt",
"input",
"for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }",
"{\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }",
"int h = input.nextInt();",
"h",
"input.nextInt()",
"input.nextInt",
"input",
"char[] temp = new char[h];",
"temp",
"new char[h]",
"h",
"for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n temp[j] = cs[j];\n }",
"{\n temp[j] = cs[j];\n }",
"temp[j] = cs[j]",
"temp[j]",
"temp",
"j",
"cs[j]",
"cs",
"j",
"for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }",
"int j = h;",
"int j = h;",
"j",
"h",
"j < cs.length",
"j",
"cs.length",
"cs",
"cs.length",
"j++",
"j++",
"j",
"{\n cs[j - h] = cs[j];\n }",
"{\n cs[j - h] = cs[j];\n }",
"cs[j - h] = cs[j]",
"cs[j - h]",
"cs",
"j - h",
"j",
"h",
"cs[j]",
"cs",
"j",
"for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }",
"int j = cs.length - h;",
"int j = cs.length - h;",
"j",
"cs.length - h",
"cs.length",
"cs",
"cs.length",
"h",
"j < cs.length",
"j",
"cs.length",
"cs",
"cs.length",
"j++",
"j++",
"j",
"{\n cs[j] = temp[j - (cs.length - h)];\n }",
"{\n cs[j] = temp[j - (cs.length - h)];\n }",
"cs[j] = temp[j - (cs.length - h)]",
"cs[j]",
"cs",
"j",
"temp[j - (cs.length - h)]",
"temp",
"j - (cs.length - h)",
"j",
"(cs.length - h)",
"cs.length",
"cs",
"cs.length",
"h",
"System.out.println(cs)",
"System.out.println",
"System.out",
"System",
"System.out",
"cs",
"public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }\n }\n}",
"public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n while (true) {\n char[] cs = input.next().toCharArray();\n if (cs.length == 1 && cs[0] == '-') break;\n int m = input.nextInt();\n for (int i = 0; i < m; i++) {\n int h = input.nextInt();\n char[] temp = new char[h];\n for (int j = 0; j < h; j++) {\n temp[j] = cs[j];\n }\n for (int j = h; j < cs.length; j++) {\n cs[j - h] = cs[j];\n }\n for (int j = cs.length - h; j < cs.length; j++) {\n cs[j] = temp[j - (cs.length - h)];\n }\n }\n System.out.println(cs);\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solv();
}
private void solv() {
Scanner input = new Scanner(System.in);
while (true) {
char[] cs = input.next().toCharArray();
if (cs.length == 1 && cs[0] == '-') break;
int m = input.nextInt();
for (int i = 0; i < m; i++) {
int h = input.nextInt();
char[] temp = new char[h];
for (int j = 0; j < h; j++) {
temp[j] = cs[j];
}
for (int j = h; j < cs.length; j++) {
cs[j - h] = cs[j];
}
for (int j = cs.length - h; j < cs.length; j++) {
cs[j] = temp[j - (cs.length - h)];
}
}
System.out.println(cs);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
14,
4,
18,
13,
17,
3,
14,
13,
30,
0,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
17,
0,
13,
17,
30,
41,
13,
4,
18,
13,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
40,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
0,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
13,
19
],
[
19,
20
],
[
19,
21
],
[
13,
22
],
[
22,
23
],
[
22,
24
],
[
13,
25
],
[
25,
26
],
[
25,
27
],
[
13,
28
],
[
28,
29
],
[
28,
30
],
[
13,
31
],
[
31,
32
],
[
31,
33
],
[
13,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
43,
48
],
[
42,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
51,
63
],
[
63,
64
],
[
63,
65
],
[
51,
66
],
[
66,
67
],
[
66,
68
],
[
49,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
69,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
69,
91
],
[
91,
92
],
[
69,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
97,
104
],
[
104,
105
],
[
104,
106
],
[
9,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }\n }\n\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }\n }\n\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }\n }",
"main",
"{\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }\n }",
"try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }",
"{\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String line",
"line",
"result=\"\";",
"result",
"\"\"",
"boolean first=true;",
"first",
"true",
"int sum=0",
"sum",
"0",
"n=0",
"n",
"0",
"i=0;",
"i",
"0",
"while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }",
"(line = br.readLine()) != null",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }",
"if(line.equals(\"-\"))break;",
"line.equals(\"-\")",
"line.equals",
"line",
"\"-\"",
"break;",
"if(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}",
"first",
"{\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}",
"result=line",
"result",
"line",
"n=Integer.parseInt(br.readLine())",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"i=0",
"i",
"0",
"first=false",
"first",
"false",
"{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}",
"int a=Integer.parseInt(line);",
"a",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"result=result.substring(a,result.length())+result.substring(0,a)",
"result",
"result.substring(a,result.length())+result.substring(0,a)",
"result.substring(a,result.length())",
"result.substring",
"result",
"a",
"result.length()",
"result.length",
"result",
"result.substring(0,a)",
"result.substring",
"result",
"0",
"a",
"i++",
"i",
"if(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}",
"i==n",
"i",
"n",
"{\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"first=true",
"first",
"true",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }\n }\n\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line,result=\"\";\n boolean first=true;\n int sum=0,n=0,i=0;\n while ((line = br.readLine()) != null) {\n \tif(line.equals(\"-\"))break;\n \tif(first){\n \t\tresult=line;\n \t\tn=Integer.parseInt(br.readLine());\n \t\ti=0;\n \t\tfirst=false;\n \t}else{\n \t\tint a=Integer.parseInt(line);\n \t\tresult=result.substring(a,result.length())+result.substring(0,a);\n \t\ti++;\n \t\tif(i==n){\n \t\t\tSystem.out.println(result);\n \t\t\tfirst=true;\n \t\t}\n \t}\n }\n }\n }\n\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
// TODO ?????????????????????????????????????????????
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line,result="";
boolean first=true;
int sum=0,n=0,i=0;
while ((line = br.readLine()) != null) {
if(line.equals("-"))break;
if(first){
result=line;
n=Integer.parseInt(br.readLine());
i=0;
first=false;
}else{
int a=Integer.parseInt(line);
result=result.substring(a,result.length())+result.substring(0,a);
i++;
if(i==n){
System.out.println(result);
first=true;
}
}
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
13,
0,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
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
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
43,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
60,
64
],
[
43,
65
],
[
65,
66
],
[
65,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
]
]
| [
"import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString s = stdIn.next();\n\t\t\tif(s.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = stdIn.nextInt();\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString s = stdIn.next();\n\t\t\tif(s.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = stdIn.nextInt();\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString s = stdIn.next();\n\t\t\tif(s.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = stdIn.nextInt();\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString s = stdIn.next();\n\t\t\tif(s.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = stdIn.nextInt();\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"while(true){\n\t\t\tString s = stdIn.next();\n\t\t\tif(s.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = stdIn.nextInt();\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}",
"true",
"{\n\t\t\tString s = stdIn.next();\n\t\t\tif(s.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = stdIn.nextInt();\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}\n\t\t\tSystem.out.println(s);\n\t\t}",
"String s = stdIn.next();",
"s",
"stdIn.next()",
"stdIn.next",
"stdIn",
"if(s.equals(\"-\"))\n\t\t\t\tbreak;",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"break;",
"int m = stdIn.nextInt();",
"m",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for (int i=0; i<m; i++) {\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}",
"{\n\t\t\t\tint h = stdIn.nextInt();\n\t\t\t\tString temp = s.substring(h,s.length());\n\t\t\t\ttemp += s.substring(0,h);\n\t\t\t\ts = temp;\n\t\t\t}",
"int h = stdIn.nextInt();",
"h",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"String temp = s.substring(h,s.length());",
"temp",
"s.substring(h,s.length())",
"s.substring",
"s",
"h",
"s.length()",
"s.length",
"s",
"temp += s.substring(0,h)",
"temp",
"s.substring(0,h)",
"s.substring",
"s",
"0",
"h",
"s = temp",
"s",
"temp",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args"
]
| import java.util.*;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
while(true){
String s = stdIn.next();
if(s.equals("-"))
break;
int m = stdIn.nextInt();
for (int i=0; i<m; i++) {
int h = stdIn.nextInt();
String temp = s.substring(h,s.length());
temp += s.substring(0,h);
s = temp;
}
System.out.println(s);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
41,
13,
42,
40,
4,
18,
13,
17,
30,
0,
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,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
4,
18,
13,
13,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
29,
17,
30,
4,
18,
13,
13,
29,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
133,
8
],
[
133,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
12,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
19,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
19,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
19,
37
],
[
37,
38
],
[
19,
39
],
[
39,
40
],
[
19,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
47,
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
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
68,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
87,
91
],
[
47,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
92,
98
],
[
47,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
19,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
110,
111
],
[
9,
112
],
[
112,
113
],
[
133,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
123,
128
],
[
128,
129
],
[
114,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean isNumber (String s) {\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean isNumber (String s) {\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"try {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"Exception e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t}",
"BufferedReader input = new BufferedReader(new InputStreamReader(System.in));",
"input",
"new BufferedReader(new InputStreamReader(System.in))",
"StringBuilder answer = new StringBuilder();",
"answer",
"new StringBuilder()",
"String lb = System.getProperty(\"line.separator\");",
"lb",
"System.getProperty(\"line.separator\")",
"System.getProperty",
"System",
"\"line.separator\"",
"String str = input.readLine();",
"str",
"input.readLine()",
"input.readLine",
"input",
"int m;",
"m",
"int h;",
"h",
"while (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}",
"!str.equals(\"-\")",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}",
"m = Integer.parseInt(input.readLine())",
"m",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"for (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}",
"{\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}",
"h = Integer.parseInt(input.readLine())",
"h",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"str = (str.substring(h, str.length()) + str.substring(0, h))",
"str",
"(str.substring(h, str.length()) + str.substring(0, h))",
"str.substring(h, str.length())",
"str.substring",
"str",
"h",
"str.length()",
"str.length",
"str",
"str.substring(0, h)",
"str.substring",
"str",
"0",
"h",
"answer.append(str).append(lb)",
"answer.append(str).append",
"answer.append(str)",
"answer.append",
"answer",
"str",
"lb",
"str = input.readLine()",
"str",
"input.readLine()",
"input.readLine",
"input",
"System.out.print(answer.toString())",
"System.out.print",
"System.out",
"System",
"System.out",
"answer.toString()",
"answer.toString",
"answer",
"String[] args",
"args",
"public static boolean isNumber (String s) {\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"isNumber",
"{\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"try {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}",
"catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}",
"NumberFormatException e",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"{\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t}",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"return true;",
"true",
"String s",
"s",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean isNumber (String s) {\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tStringBuilder answer = new StringBuilder();\n\t\t\tString lb = System.getProperty(\"line.separator\");\n\t\t\t\n\t\t\tString str = input.readLine();\n\t\t\tint m;\n\t\t\tint h;\n\t\t\twhile (!str.equals(\"-\")) {\n\t\t\t\tm = Integer.parseInt(input.readLine());\n\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\th = Integer.parseInt(input.readLine());\n\t\t\t\t\tstr = (str.substring(h, str.length()) + str.substring(0, h));\n\t\t\t\t}\n\t\t\t\tanswer.append(str).append(lb);\n\t\t\t\tstr = input.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(answer.toString());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean isNumber (String s) {\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn true;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
StringBuilder answer = new StringBuilder();
String lb = System.getProperty("line.separator");
String str = input.readLine();
int m;
int h;
while (!str.equals("-")) {
m = Integer.parseInt(input.readLine());
for (int i = 0; i < m; i++) {
h = Integer.parseInt(input.readLine());
str = (str.substring(h, str.length()) + str.substring(0, h));
}
answer.append(str).append(lb);
str = input.readLine();
}
System.out.print(answer.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
public static boolean isNumber (String s) {
try {
Integer.parseInt(s);
return true;
} catch (NumberFormatException e) {
return false;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
38,
5,
13,
30,
4,
18,
13,
30,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
2,
4,
18,
13,
17,
0,
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
2,
13,
17,
13,
18,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
11,
1,
41,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
17,
18,
13,
13,
4,
18,
18,
13,
13,
17,
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
],
[
182,
11
],
[
182,
12
],
[
12,
13
],
[
12,
14
],
[
182,
15
],
[
15,
16
],
[
15,
17
],
[
182,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
20,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
20,
34
],
[
34,
35
],
[
20,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
38,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
48,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
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
],
[
76,
79
],
[
56,
80
],
[
80,
81
],
[
80,
82
],
[
56,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
85,
89
],
[
56,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
56,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
98,
109
],
[
110,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
116,
117
],
[
117,
118
],
[
110,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
136,
136
],
[
136,
137
],
[
136,
138
],
[
136,
139
],
[
132,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
110,
145
],
[
145,
146
],
[
145,
147
],
[
110,
148
],
[
148,
149
],
[
148,
150
],
[
56,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
151,
159
],
[
159,
160
],
[
160,
161
],
[
151,
162
],
[
163,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
164,
170
],
[
170,
171
],
[
170,
172
],
[
56,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
173,
178
],
[
18,
179
],
[
179,
180
],
[
0,
181
],
[
181,
182
],
[
181,
183
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString first;\n\t\tchar table[] = new char[20000];\n\n\t\tint M,h,left,right;\n\n\n\t\ttry {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString first;\n\t\tchar table[] = new char[20000];\n\n\t\tint M,h,left,right;\n\n\n\t\ttry {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main",
"public static final int BIG_NUM = 2000000000;",
"BIG_NUM",
"2000000000",
"public static final int MOD = 1000000007;",
"MOD",
"1000000007",
"public static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString first;\n\t\tchar table[] = new char[20000];\n\n\t\tint M,h,left,right;\n\n\n\t\ttry {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString first;\n\t\tchar table[] = new char[20000];\n\n\t\tint M,h,left,right;\n\n\n\t\ttry {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String first;",
"first",
"char table[] = new char[20000];",
"table",
"new char[20000]",
"20000",
"int M",
"M",
"h",
"h",
"left",
"left",
"right;",
"right",
"try {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t}",
"while(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}",
"!(first = br.readLine()).equals(\"-\")",
"(first = br.readLine()).equals(\"-\")",
"(first = br.readLine()).equals",
"(first = br.readLine())",
"first",
"br.readLine()",
"br.readLine",
"br",
"\"-\"",
"{\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}",
"for(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < first.length()",
"i",
"first.length()",
"first.length",
"first",
"i++",
"i++",
"i",
"{\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}",
"{\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}",
"table[i] = first.charAt(i)",
"table[i]",
"table",
"i",
"first.charAt(i)",
"first.charAt",
"first",
"i",
"left = 0",
"left",
"0",
"right = first.length()-1",
"right",
"first.length()-1",
"first.length()",
"first.length",
"first",
"1",
"M = Integer.parseInt(br.readLine())",
"M",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}",
"int loop = 0;",
"int loop = 0;",
"loop",
"0",
"loop < M",
"loop",
"M",
"loop++",
"loop++",
"loop",
"{\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}",
"{\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}",
"h = Integer.parseInt(br.readLine())",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}",
"table[right+1+i] = table[left+i]",
"table[right+1+i]",
"table",
"right+1+i",
"right+1+i",
"right",
"1",
"i",
"table[left+i]",
"table",
"left+i",
"left",
"i",
"left += h",
"left",
"h",
"right += h",
"right",
"h",
"for(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}",
"int i = left;",
"int i = left;",
"i",
"left",
"i <= right",
"i",
"right",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}",
"{\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}",
"System.out.printf(\"%c\", table[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%c\"",
"table[i]",
"table",
"i",
"System.out.printf(\"\\n\")",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"\\n\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString first;\n\t\tchar table[] = new char[20000];\n\n\t\tint M,h,left,right;\n\n\n\t\ttry {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString first;\n\t\tchar table[] = new char[20000];\n\n\t\tint M,h,left,right;\n\n\n\t\ttry {\n\n\t\t\twhile(!(first = br.readLine()).equals(\"-\")){\n\n\t\t\t\tfor(int i = 0; i < first.length(); i++){\n\t\t\t\t\ttable[i] = first.charAt(i);\n\t\t\t\t}\n\n\t\t\t\tleft = 0;\n\t\t\t\tright = first.length()-1;\n\n\t\t\t\tM = Integer.parseInt(br.readLine());\n\n\t\t\t\tfor(int loop = 0; loop < M; loop++){\n\t\t\t\t\th = Integer.parseInt(br.readLine());\n\n\t\t\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\t\t\ttable[right+1+i] = table[left+i];\n\t\t\t\t\t}\n\t\t\t\t\tleft += h;\n\t\t\t\t\tright += h;\n\t\t\t\t}\n\n\t\t\t\tfor(int i = left; i <= right; i++){\n\t\t\t\t\tSystem.out.printf(\"%c\", table[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"\\n\");\n\t\t\t}\n\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static final int BIG_NUM = 2000000000;
public static final int MOD = 1000000007;
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String first;
char table[] = new char[20000];
int M,h,left,right;
try {
while(!(first = br.readLine()).equals("-")){
for(int i = 0; i < first.length(); i++){
table[i] = first.charAt(i);
}
left = 0;
right = first.length()-1;
M = Integer.parseInt(br.readLine());
for(int loop = 0; loop < M; loop++){
h = Integer.parseInt(br.readLine());
for(int i = 0; i < h; i++){
table[right+1+i] = table[left+i];
}
left += h;
right += h;
}
for(int i = left; i <= right; i++){
System.out.printf("%c", table[i]);
}
System.out.printf("\n");
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
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,
17,
42,
40,
4,
18,
13,
17,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
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,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
176,
17
],
[
176,
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
],
[
31,
34
],
[
20,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
45,
55
],
[
55,
56
],
[
56,
57
],
[
45,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
41,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
41,
71
],
[
71,
72
],
[
71,
73
],
[
41,
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
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
41,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
108,
119
],
[
119,
120
],
[
120,
121
],
[
108,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
127,
128
],
[
128,
129
],
[
41,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
130,
140
],
[
140,
141
],
[
141,
142
],
[
130,
143
],
[
144,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
151,
152
],
[
41,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
41,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
41,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
166,
169
],
[
20,
170
],
[
170,
171
],
[
171,
172
],
[
18,
173
],
[
173,
174
],
[
0,
175
],
[
175,
176
],
[
175,
177
]
]
| [
"import java.util.List;\nimport java.util.ArrayList;\nimport java.util.Queue;\nimport java.util.ArrayDeque;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n String str = sc.next();\n String[] strArray = str.split(\"\");\n\n while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }\n\n sc.close();\n }\n}",
"import java.util.List;",
"List",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Queue;",
"Queue",
"java.util",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n String str = sc.next();\n String[] strArray = str.split(\"\");\n\n while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }\n\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n String str = sc.next();\n String[] strArray = str.split(\"\");\n\n while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }\n\n sc.close();\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n\n String str = sc.next();\n String[] strArray = str.split(\"\");\n\n while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] strArray = str.split(\"\");",
"strArray",
"str.split(\"\")",
"str.split",
"str",
"\"\"",
"while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }",
"!str.equals(\"-\")",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }",
"Queue<String> queue = new ArrayDeque<>();",
"queue",
"new ArrayDeque<>()",
"for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < strArray.length",
"i",
"strArray.length",
"strArray",
"strArray.length",
"i++",
"i++",
"i",
"{\n queue.add(strArray[i]);\n }",
"{\n queue.add(strArray[i]);\n }",
"queue.add(strArray[i])",
"queue.add",
"queue",
"strArray[i]",
"strArray",
"i",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> h = new ArrayList<>();",
"h",
"new ArrayList<>()",
"for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h.add(sc.nextInt());\n }",
"{\n h.add(sc.nextInt());\n }",
"h.add(sc.nextInt())",
"h.add",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h.size()",
"i",
"h.size()",
"h.size",
"h",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }",
"{\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }",
"for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h.get(i)",
"j",
"h.get(i)",
"h.get",
"h",
"i",
"j++",
"j++",
"j",
"{\n queue.add(queue.poll());\n }",
"{\n queue.add(queue.poll());\n }",
"queue.add(queue.poll())",
"queue.add",
"queue",
"queue.poll()",
"queue.poll",
"queue",
"for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < strArray.length",
"i",
"strArray.length",
"strArray",
"strArray.length",
"i++",
"i++",
"i",
"{\n System.out.print(queue.poll());\n }",
"{\n System.out.print(queue.poll());\n }",
"System.out.print(queue.poll())",
"System.out.print",
"System.out",
"System",
"System.out",
"queue.poll()",
"queue.poll",
"queue",
"System.out.print(\"\\n\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"\\n\"",
"str = sc.next()",
"str",
"sc.next()",
"sc.next",
"sc",
"strArray = str.split(\"\")",
"strArray",
"str.split(\"\")",
"str.split",
"str",
"\"\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n String str = sc.next();\n String[] strArray = str.split(\"\");\n\n while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }\n\n sc.close();\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n String str = sc.next();\n String[] strArray = str.split(\"\");\n\n while (!str.equals(\"-\")) {\n\n Queue<String> queue = new ArrayDeque<>();\n\n for (int i = 0; i < strArray.length; i++) {\n queue.add(strArray[i]);\n }\n\n int m = sc.nextInt();\n List<Integer> h = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n h.add(sc.nextInt());\n }\n\n for (int i = 0; i < h.size(); i++) {\n for (int j = 0; j < h.get(i); j++) {\n queue.add(queue.poll());\n }\n }\n\n for (int i = 0; i < strArray.length; i++) {\n System.out.print(queue.poll());\n }\n\n System.out.print(\"\\n\");\n\n str = sc.next();\n strArray = str.split(\"\");\n }\n\n sc.close();\n }\n}",
"Main"
]
| import java.util.List;
import java.util.ArrayList;
import java.util.Queue;
import java.util.ArrayDeque;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
String[] strArray = str.split("");
while (!str.equals("-")) {
Queue<String> queue = new ArrayDeque<>();
for (int i = 0; i < strArray.length; i++) {
queue.add(strArray[i]);
}
int m = sc.nextInt();
List<Integer> h = new ArrayList<>();
for (int i = 0; i < m; i++) {
h.add(sc.nextInt());
}
for (int i = 0; i < h.size(); i++) {
for (int j = 0; j < h.get(i); j++) {
queue.add(queue.poll());
}
}
for (int i = 0; i < strArray.length; i++) {
System.out.print(queue.poll());
}
System.out.print("\n");
str = sc.next();
strArray = str.split("");
}
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,
20,
12,
13,
30,
41,
13,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
0,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
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
],
[
149,
23
],
[
149,
24
],
[
24,
25
],
[
24,
26
],
[
149,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
36,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
36,
53
],
[
53,
54
],
[
53,
55
],
[
36,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
36,
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
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
113,
114
],
[
36,
115
],
[
115,
116
],
[
115,
117
],
[
36,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
118,
128
],
[
128,
129
],
[
129,
130
],
[
118,
131
],
[
132,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
36,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
27,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
]
| [
"import java.util.HashMap;\nimport java.util.ArrayList;\nimport java.util.Scanner;\nimport java.util.regex.Pattern;\nimport java.util.Collections;\nimport java.math.BigDecimal;\nimport java.util.LinkedList;\n\npublic class Main {\n public static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) throws Exception {\n LinkedList<Character> list;\n while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }\n }\n}",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.regex.Pattern;",
"Pattern",
"java.util.regex",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.util.LinkedList;",
"LinkedList",
"java.util",
"public class Main {\n public static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) throws Exception {\n LinkedList<Character> list;\n while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }\n }\n}",
"Main",
"public static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) throws Exception {\n LinkedList<Character> list;\n while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }\n }",
"main",
"{\n LinkedList<Character> list;\n while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }\n }",
"LinkedList<Character> list;",
"list",
"while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if (s.equals(\"-\")) break;",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"break;",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list = new LinkedList<>()",
"list",
"new LinkedList<>()",
"for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n list.addLast(s.charAt(i));\n }",
"{\n list.addLast(s.charAt(i));\n }",
"list.addLast(s.charAt(i))",
"list.addLast",
"list",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }",
"{\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"{\n list.addLast(list.pollFirst());\n }",
"{\n list.addLast(list.pollFirst());\n }",
"list.addLast(list.pollFirst())",
"list.addLast",
"list",
"list.pollFirst()",
"list.pollFirst",
"list",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < list.size()",
"i",
"list.size()",
"list.size",
"list",
"i++",
"i++",
"i",
"{\n sb.append(list.get(i));\n }",
"{\n sb.append(list.get(i));\n }",
"sb.append(list.get(i))",
"sb.append",
"sb",
"list.get(i)",
"list.get",
"list",
"i",
"System.out.println(sb)",
"System.out.println",
"System.out",
"System",
"System.out",
"sb",
"String[] args",
"args",
"public class Main {\n public static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) throws Exception {\n LinkedList<Character> list;\n while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }\n }\n}",
"public class Main {\n public static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) throws Exception {\n LinkedList<Character> list;\n while (sc.hasNext()) {\n String s = sc.next();\n if (s.equals(\"-\")) break;\n int n = sc.nextInt();\n list = new LinkedList<>();\n \n for (int i = 0; i < s.length(); i++) {\n list.addLast(s.charAt(i));\n }\n \n for (int i = 0; i < n; i++) {\n int m = sc.nextInt();\n for (int j = 0; j < m; j++) {\n list.addLast(list.pollFirst());\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < list.size(); i++) {\n sb.append(list.get(i));\n }\n System.out.println(sb);\n }\n }\n}",
"Main"
]
| import java.util.HashMap;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.regex.Pattern;
import java.util.Collections;
import java.math.BigDecimal;
import java.util.LinkedList;
public class Main {
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws Exception {
LinkedList<Character> list;
while (sc.hasNext()) {
String s = sc.next();
if (s.equals("-")) break;
int n = sc.nextInt();
list = new LinkedList<>();
for (int i = 0; i < s.length(); i++) {
list.addLast(s.charAt(i));
}
for (int i = 0; i < n; i++) {
int m = sc.nextInt();
for (int j = 0; j < m; j++) {
list.addLast(list.pollFirst());
}
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < list.size(); i++) {
sb.append(list.get(i));
}
System.out.println(sb);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
20,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
73,
5
],
[
73,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
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
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
6,
70
],
[
70,
71
],
[
0,
72
],
[
72,
73
],
[
72,
74
]
]
| [
"import 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\tString shuffled_card = \"\"; // シャッフル後のカードの状態\n\t\tint m = 0; // シャッフル回数\n\t\tint h = 0; // 下からとる枚数\n\t\tint MAX_DATA = 10;\n\t\tint NUMBER_OF_DATA = 0;\n\t\tString n = \"\"; // 入力されたカードの山\n\t\tboolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数\n\t\tboolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数\n\t\tString[] output = new String[MAX_DATA];\n\n\t\tout: for (int i = 0; i < MAX_DATA; i++) {\n\n\t\t\t// 始:カードの入力とチェック\n\t\t\tn = sc.next();\n\t\t\tshuffled_card = n;\n\t\t\tif (n.equals(\"-\")) {\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\tNUMBER_OF_DATA++;\n\t\t\tif (n.length() < 1 || n.length() > 200) {\n\t\t\t\tjudge_n = false;\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\t// 終:カードの入力とチェック\n\n\t\t\t// 始:シャッフル回数mの入力とチェック\n\t\t\tm = sc.nextInt();\n\n\t\t\tif (m < 1 && m > 100) {\n\t\t\t\tjudge_m = false;\n\t\t\t\tbreak out;\n\n\t\t\t}\n\t\t\t// 終:シャッフル回数mの入力とチェック\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tshuffled_card = shuffled_card.substring(h,\n\t\t\t\t\t\tshuffled_card.length())\n\t\t\t\t\t\t+ shuffled_card.substring(0, h);\n\n\t\t\t}\n\t\t\toutput[i] = shuffled_card;\n\t\t}// out:for文ここまで\n\n\t\tif (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}\n\t}\n}\n",
"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\tString shuffled_card = \"\"; // シャッフル後のカードの状態\n\t\tint m = 0; // シャッフル回数\n\t\tint h = 0; // 下からとる枚数\n\t\tint MAX_DATA = 10;\n\t\tint NUMBER_OF_DATA = 0;\n\t\tString n = \"\"; // 入力されたカードの山\n\t\tboolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数\n\t\tboolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数\n\t\tString[] output = new String[MAX_DATA];\n\n\t\tout: for (int i = 0; i < MAX_DATA; i++) {\n\n\t\t\t// 始:カードの入力とチェック\n\t\t\tn = sc.next();\n\t\t\tshuffled_card = n;\n\t\t\tif (n.equals(\"-\")) {\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\tNUMBER_OF_DATA++;\n\t\t\tif (n.length() < 1 || n.length() > 200) {\n\t\t\t\tjudge_n = false;\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\t// 終:カードの入力とチェック\n\n\t\t\t// 始:シャッフル回数mの入力とチェック\n\t\t\tm = sc.nextInt();\n\n\t\t\tif (m < 1 && m > 100) {\n\t\t\t\tjudge_m = false;\n\t\t\t\tbreak out;\n\n\t\t\t}\n\t\t\t// 終:シャッフル回数mの入力とチェック\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tshuffled_card = shuffled_card.substring(h,\n\t\t\t\t\t\tshuffled_card.length())\n\t\t\t\t\t\t+ shuffled_card.substring(0, h);\n\n\t\t\t}\n\t\t\toutput[i] = shuffled_card;\n\t\t}// out:for文ここまで\n\n\t\tif (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString shuffled_card = \"\"; // シャッフル後のカードの状態\n\t\tint m = 0; // シャッフル回数\n\t\tint h = 0; // 下からとる枚数\n\t\tint MAX_DATA = 10;\n\t\tint NUMBER_OF_DATA = 0;\n\t\tString n = \"\"; // 入力されたカードの山\n\t\tboolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数\n\t\tboolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数\n\t\tString[] output = new String[MAX_DATA];\n\n\t\tout: for (int i = 0; i < MAX_DATA; i++) {\n\n\t\t\t// 始:カードの入力とチェック\n\t\t\tn = sc.next();\n\t\t\tshuffled_card = n;\n\t\t\tif (n.equals(\"-\")) {\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\tNUMBER_OF_DATA++;\n\t\t\tif (n.length() < 1 || n.length() > 200) {\n\t\t\t\tjudge_n = false;\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\t// 終:カードの入力とチェック\n\n\t\t\t// 始:シャッフル回数mの入力とチェック\n\t\t\tm = sc.nextInt();\n\n\t\t\tif (m < 1 && m > 100) {\n\t\t\t\tjudge_m = false;\n\t\t\t\tbreak out;\n\n\t\t\t}\n\t\t\t// 終:シャッフル回数mの入力とチェック\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tshuffled_card = shuffled_card.substring(h,\n\t\t\t\t\t\tshuffled_card.length())\n\t\t\t\t\t\t+ shuffled_card.substring(0, h);\n\n\t\t\t}\n\t\t\toutput[i] = shuffled_card;\n\t\t}// out:for文ここまで\n\n\t\tif (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString shuffled_card = \"\"; // シャッフル後のカードの状態\n\t\tint m = 0; // シャッフル回数\n\t\tint h = 0; // 下からとる枚数\n\t\tint MAX_DATA = 10;\n\t\tint NUMBER_OF_DATA = 0;\n\t\tString n = \"\"; // 入力されたカードの山\n\t\tboolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数\n\t\tboolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数\n\t\tString[] output = new String[MAX_DATA];\n\n\t\tout: for (int i = 0; i < MAX_DATA; i++) {\n\n\t\t\t// 始:カードの入力とチェック\n\t\t\tn = sc.next();\n\t\t\tshuffled_card = n;\n\t\t\tif (n.equals(\"-\")) {\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\tNUMBER_OF_DATA++;\n\t\t\tif (n.length() < 1 || n.length() > 200) {\n\t\t\t\tjudge_n = false;\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\t// 終:カードの入力とチェック\n\n\t\t\t// 始:シャッフル回数mの入力とチェック\n\t\t\tm = sc.nextInt();\n\n\t\t\tif (m < 1 && m > 100) {\n\t\t\t\tjudge_m = false;\n\t\t\t\tbreak out;\n\n\t\t\t}\n\t\t\t// 終:シャッフル回数mの入力とチェック\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tshuffled_card = shuffled_card.substring(h,\n\t\t\t\t\t\tshuffled_card.length())\n\t\t\t\t\t\t+ shuffled_card.substring(0, h);\n\n\t\t\t}\n\t\t\toutput[i] = shuffled_card;\n\t\t}// out:for文ここまで\n\n\t\tif (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String shuffled_card = \"\";",
"shuffled_card",
"\"\"",
"int m = 0;",
"m",
"0",
"int h = 0;",
"h",
"0",
"int MAX_DATA = 10;",
"MAX_DATA",
"10",
"int NUMBER_OF_DATA = 0;",
"NUMBER_OF_DATA",
"0",
"String n = \"\";",
"n",
"\"\"",
"boolean judge_m = true;",
"judge_m",
"true",
"boolean judge_n = true;",
"judge_n",
"true",
"String[] output = new String[MAX_DATA];",
"output",
"new String[MAX_DATA]",
"MAX_DATA",
"if (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}",
"judge_m == true && judge_n == true",
"judge_m == true",
"judge_m",
"true",
"judge_n == true",
"judge_n",
"true",
"{\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}",
"for (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < NUMBER_OF_DATA",
"k",
"NUMBER_OF_DATA",
"k++",
"k++",
"k",
"{\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}",
"System.out.println(output[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"output[k]",
"output",
"k",
"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\tString shuffled_card = \"\"; // シャッフル後のカードの状態\n\t\tint m = 0; // シャッフル回数\n\t\tint h = 0; // 下からとる枚数\n\t\tint MAX_DATA = 10;\n\t\tint NUMBER_OF_DATA = 0;\n\t\tString n = \"\"; // 入力されたカードの山\n\t\tboolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数\n\t\tboolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数\n\t\tString[] output = new String[MAX_DATA];\n\n\t\tout: for (int i = 0; i < MAX_DATA; i++) {\n\n\t\t\t// 始:カードの入力とチェック\n\t\t\tn = sc.next();\n\t\t\tshuffled_card = n;\n\t\t\tif (n.equals(\"-\")) {\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\tNUMBER_OF_DATA++;\n\t\t\tif (n.length() < 1 || n.length() > 200) {\n\t\t\t\tjudge_n = false;\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\t// 終:カードの入力とチェック\n\n\t\t\t// 始:シャッフル回数mの入力とチェック\n\t\t\tm = sc.nextInt();\n\n\t\t\tif (m < 1 && m > 100) {\n\t\t\t\tjudge_m = false;\n\t\t\t\tbreak out;\n\n\t\t\t}\n\t\t\t// 終:シャッフル回数mの入力とチェック\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tshuffled_card = shuffled_card.substring(h,\n\t\t\t\t\t\tshuffled_card.length())\n\t\t\t\t\t\t+ shuffled_card.substring(0, h);\n\n\t\t\t}\n\t\t\toutput[i] = shuffled_card;\n\t\t}// out:for文ここまで\n\n\t\tif (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}\n\t}\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\tString shuffled_card = \"\"; // シャッフル後のカードの状態\n\t\tint m = 0; // シャッフル回数\n\t\tint h = 0; // 下からとる枚数\n\t\tint MAX_DATA = 10;\n\t\tint NUMBER_OF_DATA = 0;\n\t\tString n = \"\"; // 入力されたカードの山\n\t\tboolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数\n\t\tboolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数\n\t\tString[] output = new String[MAX_DATA];\n\n\t\tout: for (int i = 0; i < MAX_DATA; i++) {\n\n\t\t\t// 始:カードの入力とチェック\n\t\t\tn = sc.next();\n\t\t\tshuffled_card = n;\n\t\t\tif (n.equals(\"-\")) {\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\tNUMBER_OF_DATA++;\n\t\t\tif (n.length() < 1 || n.length() > 200) {\n\t\t\t\tjudge_n = false;\n\t\t\t\tbreak out;\n\t\t\t}\n\t\t\t// 終:カードの入力とチェック\n\n\t\t\t// 始:シャッフル回数mの入力とチェック\n\t\t\tm = sc.nextInt();\n\n\t\t\tif (m < 1 && m > 100) {\n\t\t\t\tjudge_m = false;\n\t\t\t\tbreak out;\n\n\t\t\t}\n\t\t\t// 終:シャッフル回数mの入力とチェック\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\th = sc.nextInt();\n\t\t\t\tshuffled_card = shuffled_card.substring(h,\n\t\t\t\t\t\tshuffled_card.length())\n\t\t\t\t\t\t+ shuffled_card.substring(0, h);\n\n\t\t\t}\n\t\t\toutput[i] = shuffled_card;\n\t\t}// out:for文ここまで\n\n\t\tif (judge_m == true && judge_n == true) {\n\t\t\tfor (int k = 0; k < NUMBER_OF_DATA; k++) {\n\t\t\t\tSystem.out.println(output[k]);\n\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
String shuffled_card = ""; // シャッフル後のカードの状態
int m = 0; // シャッフル回数
int h = 0; // 下からとる枚数
int MAX_DATA = 10;
int NUMBER_OF_DATA = 0;
String n = ""; // 入力されたカードの山
boolean judge_m = true; // シャッフル回数が条件を満たしているかを示す変数
boolean judge_n = true; // 入力されたn枚のカードが条件を満たしているかを示す変数
String[] output = new String[MAX_DATA];
out: for (int i = 0; i < MAX_DATA; i++) {
// 始:カードの入力とチェック
n = sc.next();
shuffled_card = n;
if (n.equals("-")) {
break out;
}
NUMBER_OF_DATA++;
if (n.length() < 1 || n.length() > 200) {
judge_n = false;
break out;
}
// 終:カードの入力とチェック
// 始:シャッフル回数mの入力とチェック
m = sc.nextInt();
if (m < 1 && m > 100) {
judge_m = false;
break out;
}
// 終:シャッフル回数mの入力とチェック
for (int j = 0; j < m; j++) {
h = sc.nextInt();
shuffled_card = shuffled_card.substring(h,
shuffled_card.length())
+ shuffled_card.substring(0, h);
}
output[i] = shuffled_card;
}// out:for文ここまで
if (judge_m == true && judge_n == true) {
for (int k = 0; k < NUMBER_OF_DATA; k++) {
System.out.println(output[k]);
}
}
}
}
|
[
7,
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,
41,
13,
17,
42,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
2,
13,
13,
14,
2,
13,
2,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
115,
5
],
[
115,
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
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
48,
52
],
[
45,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
45,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
45,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
32,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
32,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
32,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
32,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
95,
100
],
[
100,
101
],
[
32,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
32,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
6,
112
],
[
112,
113
],
[
0,
114
],
[
114,
115
],
[
114,
116
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString str = sc.nextLine();\n\t\tint n = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tString str2 = null;\n\n\t\twhile (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}\n\n\t}\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\n\t\tString str = sc.nextLine();\n\t\tint n = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tString str2 = null;\n\n\t\twhile (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString str = sc.nextLine();\n\t\tint n = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tString str2 = null;\n\n\t\twhile (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString str = sc.nextLine();\n\t\tint n = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tString str2 = null;\n\n\t\twhile (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str = sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String str2 = null;",
"str2",
"null",
"while (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}",
"true",
"{\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}",
"for (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}",
"str2 = str.substring(0, h)",
"str2",
"str.substring(0, h)",
"str.substring",
"str",
"0",
"h",
"str = str.substring(h, str.length())",
"str",
"str.substring(h, str.length())",
"str.substring",
"str",
"h",
"str.length()",
"str.length",
"str",
"str = str + str2",
"str",
"str + str2",
"str",
"str2",
"if (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}",
"i != n - 1",
"i",
"n - 1",
"n",
"1",
"{\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString str = sc.nextLine();\n\t\tint n = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tString str2 = null;\n\n\t\twhile (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString str = sc.nextLine();\n\t\tint n = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tString str2 = null;\n\n\t\twhile (true) {\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tstr2 = str.substring(0, h);\n\t\t\t\tstr = str.substring(h, str.length());\n\t\t\t\tstr = str + str2;\n\t\t\t\tif (i != n - 1) {\n\t\t\t\t\th = sc.nextInt();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(str);\n\n\t\t\tstr = sc.nextLine();\n\t\t\tstr = sc.nextLine();\n\n\t\t\tif (str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\th = sc.nextInt();\n\n\t\t}\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
int n = sc.nextInt();
int h = sc.nextInt();
String str2 = null;
while (true) {
for (int i = 0; i < n; i++) {
str2 = str.substring(0, h);
str = str.substring(h, str.length());
str = str + str2;
if (i != n - 1) {
h = sc.nextInt();
}
}
System.out.println(str);
str = sc.nextLine();
str = sc.nextLine();
if (str.equals("-")) {
break;
}
n = sc.nextInt();
h = sc.nextInt();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
14,
36
],
[
36,
37
],
[
36,
38
],
[
14,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
51,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
51,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
14,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
6,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}\n\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}",
"true",
"{\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}",
"String x = scan.next();",
"x",
"scan.next()",
"scan.next",
"scan",
"if (x.equals(\"-\")) break;",
"x.equals(\"-\")",
"x.equals",
"x",
"\"-\"",
"break;",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int l = x.length();",
"l",
"x.length()",
"x.length",
"x",
"String kekka = x;",
"kekka",
"x",
"for(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}",
"{\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"String new_x = kekka.substring(0, h);",
"new_x",
"kekka.substring(0, h)",
"kekka.substring",
"kekka",
"0",
"h",
"String new_x2 = kekka.substring(h, l);",
"new_x2",
"kekka.substring(h, l)",
"kekka.substring",
"kekka",
"h",
"l",
"kekka = new_x2 + new_x",
"kekka",
"new_x2 + new_x",
"new_x2",
"new_x",
"System.out.println(kekka)",
"System.out.println",
"System.out",
"System",
"System.out",
"kekka",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\t// ???????????????\n\t\t\tString x = scan.next();\n\t\t\tif (x.equals(\"-\")) break;\n\t\t\t// ?????£??????????????°\n\t\t\tint m = scan.nextInt();\n\t\t\t// ?????????????????????????????????\n\t\t\tint l = x.length();\n\t\t\t// ?????£????????????????????????????´????????????°\n\t\t\tString kekka = x;\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\t// ????????????????????????????´????????????°\n\t\t\t\tint h = scan.nextInt();\n\t\t\t\tString new_x = kekka.substring(0, h);\n\t\t\t\tString new_x2 = kekka.substring(h, l);\n\t\t\t\tkekka = new_x2 + new_x;\n\t\t\t}\n\t\t\t// ???????????????\n\t\t\tSystem.out.println(kekka);\n\t\t}\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner scan = new Scanner(System.in);
while(true) {
// ???????????????
String x = scan.next();
if (x.equals("-")) break;
// ?????£??????????????°
int m = scan.nextInt();
// ?????????????????????????????????
int l = x.length();
// ?????£????????????????????????????´????????????°
String kekka = x;
for(int i=0; i<m; i++){
// ????????????????????????????´????????????°
int h = scan.nextInt();
String new_x = kekka.substring(0, h);
String new_x2 = kekka.substring(h, l);
kekka = new_x2 + new_x;
}
// ???????????????
System.out.println(kekka);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
42,
17,
30,
38,
5,
13,
30,
0,
13,
17,
3,
30,
41,
13,
4,
18,
13,
0,
13,
13,
14,
2,
13,
17,
30,
3,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
38,
5,
13,
30,
0,
13,
17,
3,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
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
],
[
135,
8
],
[
135,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
11,
36
],
[
36,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
49,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
49,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
49,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
40,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
96,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
87,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
110,
114
],
[
87,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
87,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
40,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
9,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
]
| [
"import java.io.*;\nimport java.util.ArrayList;\npublic class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }\n}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }\n}\n}",
"Main",
"public static void main(String args[]){\n int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }\n}",
"main",
"{\n int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }\n}",
"int a=0",
"a",
"0",
"b=0",
"b",
"0",
"c=0",
"c",
"0",
"i=0",
"i",
"0",
"j=0",
"j",
"0",
"k=0",
"k",
"0",
"minj=0;",
"minj",
"0",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }",
"true",
"{\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }",
"try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }",
"catch(Exception e){\n str = \"\";\n break;\n }",
"Exception e",
"{\n str = \"\";\n break;\n }",
"str = \"\"",
"str",
"\"\"",
"break;",
"{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }",
"String line = reader.readLine();",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"str = line",
"str",
"line",
"if (str == \"-\") {\n break;\n }",
"str == \"-\"",
"str",
"\"-\"",
"{\n break;\n }",
"break;",
"line = reader.readLine()",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"a = Integer.parseInt(line)",
"a",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }",
"j = 0;",
"j = 0",
"j",
"0",
"j < a",
"j",
"a",
"j++",
"j++",
"j",
"{\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }",
"{\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }",
"try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }",
"catch(Exception e){\n c = 0;\n break;\n }",
"Exception e",
"{\n c = 0;\n break;\n }",
"c = 0",
"c",
"0",
"break;",
"{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }",
"String line2 = reader.readLine();",
"line2",
"reader.readLine()",
"reader.readLine",
"reader",
"c = Integer.parseInt(line2)",
"c",
"Integer.parseInt(line2)",
"Integer.parseInt",
"Integer",
"line2",
"String str1 = str.substring(0,c);",
"str1",
"str.substring(0,c)",
"str.substring",
"str",
"0",
"c",
"String str2 = str.substring(c);",
"str2",
"str.substring(c)",
"str.substring",
"str",
"c",
"str = str2 + str1",
"str",
"str2 + str1",
"str2",
"str1",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }\n}\n}",
"public class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String str;\n while(true){\n try{\n String line = reader.readLine();\n str = line;\n if (str == \"-\") {\n break;\n }\n line = reader.readLine();\n a = Integer.parseInt(line);\n }catch(Exception e){\n str = \"\";\n break;\n }\n\n\n for(j = 0;j < a; j++){\n try{\n String line2 = reader.readLine();\n c = Integer.parseInt(line2);\n }catch(Exception e){\n c = 0;\n break;\n }\n String str1 = str.substring(0,c);\n String str2 = str.substring(c);\n str = str2 + str1;\n\n }\n\n System.out.println(str);\n\n }\n}\n}",
"Main"
]
| import java.io.*;
import java.util.ArrayList;
public class Main{
public static void main(String args[]){
int a=0,b=0,c=0,i=0,j=0,k=0,minj=0;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String str;
while(true){
try{
String line = reader.readLine();
str = line;
if (str == "-") {
break;
}
line = reader.readLine();
a = Integer.parseInt(line);
}catch(Exception e){
str = "";
break;
}
for(j = 0;j < a; j++){
try{
String line2 = reader.readLine();
c = Integer.parseInt(line2);
}catch(Exception e){
c = 0;
break;
}
String str1 = str.substring(0,c);
String str2 = str.substring(c);
str = str2 + str1;
}
System.out.println(str);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
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
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
43,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
43,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
14,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
6,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\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 while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }",
"true",
"{\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"if(str.equals(\"-\"))\n break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }",
"{\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String a = str.substring(0,h);",
"a",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"String b = str.substring(h);",
"b",
"str.substring(h)",
"str.substring",
"str",
"h",
"str = b + a",
"str",
"b + a",
"b",
"a",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true)\n {\n String str = sc.next();\n if(str.equals(\"-\"))\n break;\n int n = sc.nextInt();\n for(int i = 0 ; i < n ; i++)\n {\n int h = sc.nextInt();\n String a = str.substring(0,h);\n String b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(true)
{
String str = sc.next();
if(str.equals("-"))
break;
int n = sc.nextInt();
for(int i = 0 ; i < n ; i++)
{
int h = sc.nextInt();
String a = str.substring(0,h);
String b = str.substring(h);
str = b + a;
}
System.out.println(str);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
0,
13,
2,
4,
18,
13,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
20,
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
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
49,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
64,
72
],
[
20,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int m,i,h;\n \n while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }\n }\n}",
"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 int m,i,h;\n \n while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int m,i,h;\n \n while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n int m,i,h;\n \n while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int m",
"m",
"i",
"i",
"h;",
"h",
"while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }",
"true",
"{\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }",
"String c = stdIn.next();",
"c",
"stdIn.next()",
"stdIn.next",
"stdIn",
"if(c.equals(\"-\"))\n break;",
"c.equals(\"-\")",
"c.equals",
"c",
"\"-\"",
"break;",
"m = stdIn.nextInt()",
"m",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }",
"i=0;",
"i=0",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }",
"{\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }",
"h = stdIn.nextInt()",
"h",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"String t=c.substring(0,h);",
"t",
"c.substring(0,h)",
"c.substring",
"c",
"0",
"h",
"c=c.substring(h,c.length())+t",
"c",
"c.substring(h,c.length())+t",
"c.substring(h,c.length())",
"c.substring",
"c",
"h",
"c.length()",
"c.length",
"c",
"t",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int m,i,h;\n \n while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int m,i,h;\n \n while(true){\n String c = stdIn.next();\n if(c.equals(\"-\"))\n break;\n \n m = stdIn.nextInt();\n for(i=0;i<m;i++){\n h = stdIn.nextInt();\n String t=c.substring(0,h);\n c=c.substring(h,c.length())+t;\n }\n System.out.println(c);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int m,i,h;
while(true){
String c = stdIn.next();
if(c.equals("-"))
break;
m = stdIn.nextInt();
for(i=0;i<m;i++){
h = stdIn.nextInt();
String t=c.substring(0,h);
c=c.substring(h,c.length())+t;
}
System.out.println(c);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
0,
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,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
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
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
23,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
33,
40
],
[
31,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
41,
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
],
[
68,
69
],
[
69,
70
],
[
62,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
81,
85
],
[
41,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
9,
92
],
[
92,
93
]
]
| [
"import java.util.*;\nimport java.io.*;\n\nclass Main {\n public static void main(String args[]) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String cards;\n int m = 0;\n int h = 0;\n try {\n while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String args[]) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String cards;\n int m = 0;\n int h = 0;\n try {\n while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"Main",
"public static void main(String args[]) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String cards;\n int m = 0;\n int h = 0;\n try {\n while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String cards;\n int m = 0;\n int h = 0;\n try {\n while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String cards;",
"cards",
"int m = 0;",
"m",
"0",
"int h = 0;",
"h",
"0",
"try {\n while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }\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 while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }\n }",
"while (!(cards = br.readLine()).equals(\"-\")) {\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }",
"!(cards = br.readLine()).equals(\"-\")",
"(cards = br.readLine()).equals(\"-\")",
"(cards = br.readLine()).equals",
"(cards = br.readLine())",
"cards",
"br.readLine()",
"br.readLine",
"br",
"\"-\"",
"{\n m = Integer.parseInt(br.readLine());\n for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }\n System.out.println(cards);\n }",
"m = Integer.parseInt(br.readLine())",
"m",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < m; i++) {\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }",
"{\n h = Integer.parseInt(br.readLine());\n cards = cards.substring(h, cards.length()) + cards.substring(0, h);\n }",
"h = Integer.parseInt(br.readLine())",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"cards = cards.substring(h, cards.length()) + cards.substring(0, h)",
"cards",
"cards.substring(h, cards.length()) + cards.substring(0, h)",
"cards.substring(h, cards.length())",
"cards.substring",
"cards",
"h",
"cards.length()",
"cards.length",
"cards",
"cards.substring(0, h)",
"cards.substring",
"cards",
"0",
"h",
"System.out.println(cards)",
"System.out.println",
"System.out",
"System",
"System.out",
"cards",
"String args[]",
"args"
]
| import java.util.*;
import java.io.*;
class Main {
public static void main(String args[]) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String cards;
int m = 0;
int h = 0;
try {
while (!(cards = br.readLine()).equals("-")) {
m = Integer.parseInt(br.readLine());
for (int i = 0; i < m; i++) {
h = Integer.parseInt(br.readLine());
cards = cards.substring(h, cards.length()) + cards.substring(0, h);
}
System.out.println(cards);
}
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
40,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
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
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
49,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
23,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
23,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
6,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String input = sc.next();\n\n while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }\n sc.close();\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\n String input = sc.next();\n\n while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String input = sc.next();\n\n while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n String input = sc.next();\n\n while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String input = sc.next();",
"input",
"sc.next()",
"sc.next",
"sc",
"while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }",
"!(input.equals(\"-\"))",
"(input.equals(\"-\"))",
"input.equals",
"input",
"\"-\"",
"{\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }",
"int time = sc.nextInt();",
"time",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < time",
"i",
"time",
"i++",
"i++",
"i",
"{\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }",
"{\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }",
"int place = sc.nextInt();",
"place",
"sc.nextInt()",
"sc.nextInt",
"sc",
"input = input.substring(place) + input.substring(0, place)",
"input",
"input.substring(place) + input.substring(0, place)",
"input.substring(place)",
"input.substring",
"input",
"place",
"input.substring(0, place)",
"input.substring",
"input",
"0",
"place",
"System.out.println(input)",
"System.out.println",
"System.out",
"System",
"System.out",
"input",
"input = sc.next()",
"input",
"sc.next()",
"sc.next",
"sc",
"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\n String input = sc.next();\n\n while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String input = sc.next();\n\n while(!(input.equals(\"-\"))){\n int time = sc.nextInt();\n for(int i = 0; i < time; i++){\n int place = sc.nextInt();\n input = input.substring(place) + input.substring(0, place);\n\n }\n System.out.println(input);\n input = sc.next();\n }\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String input = sc.next();
while(!(input.equals("-"))){
int time = sc.nextInt();
for(int i = 0; i < time; i++){
int place = sc.nextInt();
input = input.substring(place) + input.substring(0, place);
}
System.out.println(input);
input = sc.next();
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
13,
30,
0,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
40,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
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,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
18,
13,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
141,
5
],
[
141,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
13,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
50,
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
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
91,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
97,
109
],
[
109,
110
],
[
110,
111
],
[
97,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
91,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
123,
131
],
[
50,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
6,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint numN;\n\t\tchar ch;\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint numN;\n\t\tchar ch;\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tint numN;\n\t\tchar ch;\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"main",
"{\n\n\t\tint numN;\n\t\tchar ch;\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"int numN;",
"numN",
"char ch;",
"ch",
"Scanner sc = null;",
"sc",
"null",
"try {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}",
"catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t}",
"NumberFormatException e",
"{\n\t\t\tSystem.out.println(e);\n\t\t}",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{\n\t\t\tsc.close();\n\t\t}",
"sc.close()",
"sc.close",
"sc",
"{\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"while (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"if (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}",
"!line.equals(\"-\")",
"line.equals(\"-\")",
"line.equals",
"line",
"\"-\"",
"{\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}",
"char[] card = line.toCharArray();",
"card",
"line.toCharArray()",
"line.toCharArray",
"line",
"int numH = sc.nextInt();",
"numH",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < numH",
"i",
"numH",
"i++",
"i++",
"i",
"{\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"{\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"numN = sc.nextInt()",
"numN",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < numN",
"j",
"numN",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}",
"{\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}",
"ch = card[0]",
"ch",
"card[0]",
"card",
"0",
"for (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < card.length - 1",
"k",
"card.length - 1",
"card.length",
"card",
"card.length",
"1",
"k++",
"k++",
"k",
"{\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}",
"{\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}",
"card[k] = card[k + 1]",
"card[k]",
"card",
"k",
"card[k + 1]",
"card",
"k + 1",
"k",
"1",
"card[card.length - 1] = ch",
"card[card.length - 1]",
"card",
"card.length - 1",
"card.length",
"card",
"card.length",
"1",
"ch",
"System.out.println(card)",
"System.out.println",
"System.out",
"System",
"System.out",
"card",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint numN;\n\t\tchar ch;\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint numN;\n\t\tchar ch;\n\n\t\tScanner sc = null;\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\twhile (sc.hasNext()) {\n\n\t\t\t\tString line = sc.next();\n\t\t\t\t//?????????????¢????\n\t\t\t\tif (!line.equals(\"-\")) {\n\t\t\t\t\tchar[] card = line.toCharArray();\n\n\t\t\t\t\tint numH = sc.nextInt();\n\n\n\t\t\t\t\t//?????£????????????????????°\n\t\t\t\t\tfor (int i = 0; i < numH; i++) {\n\n\t\t\t\t\t\t//?????£?????????????????°\n\t\t\t\t\t\tnumN = sc.nextInt();\n\t\t\t\t\t\tfor (int j = 0; j < numN; j++) {\n\t\t\t\t\t\t\tch = card[0];\n\t\t\t\t\t\t\tfor (int k = 0; k < card.length - 1; k++) {\n\n\t\t\t\t\t\t\t\tcard[k] = card[k + 1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcard[card.length - 1] = ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int numN;
char ch;
Scanner sc = null;
try {
sc = new Scanner(System.in);
while (sc.hasNext()) {
String line = sc.next();
//?????????????¢????
if (!line.equals("-")) {
char[] card = line.toCharArray();
int numH = sc.nextInt();
//?????£????????????????????°
for (int i = 0; i < numH; i++) {
//?????£?????????????????°
numN = sc.nextInt();
for (int j = 0; j < numN; j++) {
ch = card[0];
for (int k = 0; k < card.length - 1; k++) {
card[k] = card[k + 1];
}
card[card.length - 1] = ch;
}
}
System.out.println(card);
}
}
}catch (NumberFormatException e) {
System.out.println(e);
} finally {
sc.close();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
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,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
46,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
46,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
8,
76
],
[
76,
77
],
[
77,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\n\t\tsc.close();\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\n\t\tsc.close();\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}",
"true",
"{\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}",
"String cards = sc.next();",
"cards",
"sc.next()",
"sc.next",
"sc",
"if(cards.equals(\"-\")) break;",
"cards.equals(\"-\")",
"cards.equals",
"cards",
"\"-\"",
"break;",
"int shuffleNum = sc.nextInt();",
"shuffleNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"StringBuilder sb = new StringBuilder(cards);",
"sb",
"new StringBuilder(cards)",
"for(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<shuffleNum",
"i",
"shuffleNum",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}",
"{\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String cutStr = sb.substring(0, h);",
"cutStr",
"sb.substring(0, h)",
"sb.substring",
"sb",
"0",
"h",
"sb.delete(0, h)",
"sb.delete",
"sb",
"0",
"h",
"sb.append(cutStr)",
"sb.append",
"sb",
"cutStr",
"System.out.println(sb.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.toString()",
"sb.toString",
"sb",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) break;\n\t\t\tint shuffleNum = sc.nextInt();\n\n\t\t\tStringBuilder sb = new StringBuilder(cards);\n\t\t\tfor(int i=0; i<shuffleNum; i++) {\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\tString cutStr = sb.substring(0, h);\n\t\t\t\tsb.delete(0, h);\n\t\t\t\tsb.append(cutStr);\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
String cards = sc.next();
if(cards.equals("-")) break;
int shuffleNum = sc.nextInt();
StringBuilder sb = new StringBuilder(cards);
for(int i=0; i<shuffleNum; i++) {
int h = sc.nextInt();
String cutStr = sb.substring(0, h);
sb.delete(0, h);
sb.append(cutStr);
}
System.out.println(sb.toString());
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
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
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
44,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
44,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}\n\t}\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\twhile (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}",
"true",
"{\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}",
"String cards = sc.next();",
"cards",
"sc.next()",
"sc.next",
"sc",
"if(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"cards.equals(\"-\")",
"cards.equals",
"cards",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}",
"{\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}",
"int count=sc.nextInt();",
"count",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String move=cards.substring(0,count);",
"move",
"cards.substring(0,count)",
"cards.substring",
"cards",
"0",
"count",
"String move2=cards.substring(count);",
"move2",
"cards.substring(count)",
"cards.substring",
"cards",
"count",
"cards=move2+move",
"cards",
"move2+move",
"move2",
"move",
"System.out.println(cards)",
"System.out.println",
"System.out",
"System",
"System.out",
"cards",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString cards = sc.next();\n\t\t\tif(cards.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint m = sc.nextInt();\nfor(int i=0;i<m;i++) {\n\tint count=sc.nextInt();\n\tString move=cards.substring(0,count);\n\tString move2=cards.substring(count);\n\tcards=move2+move;\n}\nSystem.out.println(cards);\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String cards = sc.next();
if(cards.equals("-")) {
break;
}
int m = sc.nextInt();
for(int i=0;i<m;i++) {
int count=sc.nextInt();
String move=cards.substring(0,count);
String move2=cards.substring(count);
cards=move2+move;
}
System.out.println(cards);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
4,
18,
13,
11,
1,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
43,
44
],
[
37,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
46,
54
],
[
54,
55
],
[
46,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
46,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
20,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
6,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str;\n int h,m;\n while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n sc.close();\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 String str;\n int h,m;\n while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str;\n int h,m;\n while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String str;\n int h,m;\n while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str;",
"str",
"int h",
"h",
"m;",
"m",
"while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }",
"true",
"{\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }",
"str = sc.next()",
"str",
"sc.next()",
"sc.next",
"sc",
"if(str.equals(\"-\")) break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }",
";",
"m>0",
"m",
"0",
"m--",
"m--",
"m",
"{\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }",
"{\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String a",
"a",
"b;",
"b",
"a = str.substring(0,h)",
"a",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"b = str.substring(h)",
"b",
"str.substring(h)",
"str.substring",
"str",
"h",
"str = b + a",
"str",
"b + a",
"b",
"a",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"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 String str;\n int h,m;\n while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n sc.close();\n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str;\n int h,m;\n while(true){\n str = sc.next();\n if(str.equals(\"-\")) break;\n m = sc.nextInt();\n for(;m>0;m--){\n h = sc.nextInt();\n String a,b;\n a = str.substring(0,h);\n b = str.substring(h);\n str = b + a;\n }\n System.out.println(str);\n }\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str;
int h,m;
while(true){
str = sc.next();
if(str.equals("-")) break;
m = sc.nextInt();
for(;m>0;m--){
h = sc.nextInt();
String a,b;
a = str.substring(0,h);
b = str.substring(h);
str = b + a;
}
System.out.println(str);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
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,
4,
18,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
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
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
26,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
26,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
69,
73
],
[
58,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
58,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
26,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
6,
92
],
[
92,
93
]
]
| [
"import java.io.*;\n\nclass Main{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString str1,str2;\n\t\tint m=0;\n\t\tint h=0;\n\n\t\twhile(true){\n\t\t\tstr = buf.readLine();\n\t\t\tif(str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tm = Integer.parseInt(buf.readLine());\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\t\n\t\t\n\t\t\n\t\t\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"class Main{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString str1,str2;\n\t\tint m=0;\n\t\tint h=0;\n\n\t\twhile(true){\n\t\t\tstr = buf.readLine();\n\t\t\tif(str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tm = Integer.parseInt(buf.readLine());\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\t\n\t\t\n\t\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException{\n\t\tBufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString str1,str2;\n\t\tint m=0;\n\t\tint h=0;\n\n\t\twhile(true){\n\t\t\tstr = buf.readLine();\n\t\t\tif(str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tm = Integer.parseInt(buf.readLine());\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\t\n\t\t\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\tBufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString str1,str2;\n\t\tint m=0;\n\t\tint h=0;\n\n\t\twhile(true){\n\t\t\tstr = buf.readLine();\n\t\t\tif(str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tm = Integer.parseInt(buf.readLine());\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\t\n\t\t\n\t\t\n\t\t\n\t}",
"BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));",
"buf",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"String str1",
"str1",
"str2;",
"str2",
"int m=0;",
"m",
"0",
"int h=0;",
"h",
"0",
"while(true){\n\t\t\tstr = buf.readLine();\n\t\t\tif(str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tm = Integer.parseInt(buf.readLine());\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}",
"true",
"{\n\t\t\tstr = buf.readLine();\n\t\t\tif(str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tm = Integer.parseInt(buf.readLine());\n\t\t\tfor(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}",
"str = buf.readLine()",
"str",
"buf.readLine()",
"buf.readLine",
"buf",
"if(str.equals(\"-\"))\n\t\t\t\tbreak;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"m = Integer.parseInt(buf.readLine())",
"m",
"Integer.parseInt(buf.readLine())",
"Integer.parseInt",
"Integer",
"buf.readLine()",
"buf.readLine",
"buf",
"for(int i=0; i<m; i++){\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}",
"{\n\t\t\t\th = Integer.parseInt(buf.readLine());\n\t\t\t\tstr1 = str.substring(0,h);\n\t\t\t\tstr2 = str.substring(h);\n\t\t\t\tstr = str2.concat(str1);\n\t\t\t}",
"h = Integer.parseInt(buf.readLine())",
"h",
"Integer.parseInt(buf.readLine())",
"Integer.parseInt",
"Integer",
"buf.readLine()",
"buf.readLine",
"buf",
"str1 = str.substring(0,h)",
"str1",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"str2 = str.substring(h)",
"str2",
"str.substring(h)",
"str.substring",
"str",
"h",
"str = str2.concat(str1)",
"str",
"str2.concat(str1)",
"str2.concat",
"str2",
"str1",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String args[]",
"args"
]
| import java.io.*;
class Main{
public static void main(String args[]) throws IOException{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str;
String str1,str2;
int m=0;
int h=0;
while(true){
str = buf.readLine();
if(str.equals("-"))
break;
m = Integer.parseInt(buf.readLine());
for(int i=0; i<m; i++){
h = Integer.parseInt(buf.readLine());
str1 = str.substring(0,h);
str2 = str.substring(h);
str = str2.concat(str1);
}
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
13,
4,
18,
13,
18,
13,
13,
28,
13,
13,
30,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
2,
13,
13,
11,
1,
41,
13,
2,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
192,
5
],
[
192,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
18,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
26,
36
],
[
36,
37
],
[
36,
38
],
[
39,
40
],
[
40,
41
],
[
26,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
26,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
62,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
26,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
100,
103
],
[
103,
104
],
[
104,
105
],
[
100,
106
],
[
106,
107
],
[
106,
108
],
[
26,
109
],
[
109,
110
],
[
109,
111
],
[
109,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
26,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
6,
124
],
[
124,
125
],
[
192,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
133,
143
],
[
143,
144
],
[
144,
145
],
[
133,
146
],
[
147,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
128,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
161,
163
],
[
157,
164
],
[
164,
165
],
[
164,
166
],
[
157,
167
],
[
167,
168
],
[
168,
169
],
[
157,
170
],
[
171,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
128,
183
],
[
183,
184
],
[
126,
185
],
[
185,
186
],
[
126,
187
],
[
187,
188
],
[
126,
189
],
[
189,
190
],
[
0,
191
],
[
191,
192
],
[
191,
193
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String input;\n int m;\n\n while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }\n }\n\n public static char[] change(char[] input, int length, int n) {\n char[] output = new char[length];\n\n for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }\n for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }\n\n return output;\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 String input;\n int m;\n\n while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }\n }\n\n public static char[] change(char[] input, int length, int n) {\n char[] output = new char[length];\n\n for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }\n for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }\n\n return output;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String input;\n int m;\n\n while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String input;\n int m;\n\n while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String input;",
"input",
"int m;",
"m",
"while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }",
"!(input = sc.next()).equals(\"-\")",
"(input = sc.next()).equals(\"-\")",
"(input = sc.next()).equals",
"(input = sc.next())",
"input",
"sc.next()",
"sc.next",
"sc",
"\"-\"",
"{\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] h = new int[m];",
"h",
"new int[m]",
"m",
"char[] output = new char[input.length()];",
"output",
"new char[input.length()]",
"input.length()",
"input.length",
"input",
"for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h[i] = sc.nextInt();\n }",
"{\n h[i] = sc.nextInt();\n }",
"h[i] = sc.nextInt()",
"h[i]",
"h",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input.length()",
"i",
"input.length()",
"input.length",
"input",
"i++",
"i++",
"i",
"{\n output[i] = input.charAt(i);\n }",
"{\n output[i] = input.charAt(i);\n }",
"output[i] = input.charAt(i)",
"output[i]",
"output",
"i",
"input.charAt(i)",
"input.charAt",
"input",
"i",
"for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n output = change(output, input.length(), h[i]);\n }",
"{\n output = change(output, input.length(), h[i]);\n }",
"output = change(output, input.length(), h[i])",
"output",
"change(output, input.length(), h[i])",
"change",
"output",
"input.length()",
"input.length",
"input",
"h[i]",
"h",
"i",
"for (char c : output) System.out.print(c);",
"char c",
"output",
"System.out.print(c);",
"System.out.print(c)",
"System.out.print",
"System.out",
"System",
"System.out",
"c",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"public static char[] change(char[] input, int length, int n) {\n char[] output = new char[length];\n\n for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }\n for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }\n\n return output;\n }",
"change",
"{\n char[] output = new char[length];\n\n for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }\n for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }\n\n return output;\n }",
"char[] output = new char[length];",
"output",
"new char[length]",
"length",
"for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length - n",
"i",
"length - n",
"length",
"n",
"i++",
"i++",
"i",
"{\n output[i] = input[i+n];\n }",
"{\n output[i] = input[i+n];\n }",
"output[i] = input[i+n]",
"output[i]",
"output",
"i",
"input[i+n]",
"input",
"i+n",
"i",
"n",
"for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }",
"int i = length - n;",
"int i = length - n;",
"i",
"length - n",
"length",
"n",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n output[i] = input[i + n - length];\n }",
"{\n output[i] = input[i + n - length];\n }",
"output[i] = input[i + n - length]",
"output[i]",
"output",
"i",
"input[i + n - length]",
"input",
"i + n - length",
"i + n",
"i",
"n",
"length",
"return output;",
"output",
"char[] input",
"input",
"int length",
"length",
"int n",
"n",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String input;\n int m;\n\n while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }\n }\n\n public static char[] change(char[] input, int length, int n) {\n char[] output = new char[length];\n\n for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }\n for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }\n\n return output;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String input;\n int m;\n\n while (!(input = sc.next()).equals(\"-\")) {\n m = sc.nextInt();\n int[] h = new int[m];\n char[] output = new char[input.length()];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n for (int i = 0; i < input.length(); i++) {\n output[i] = input.charAt(i);\n }\n\n for (int i = 0; i < m; i++) {\n output = change(output, input.length(), h[i]);\n }\n for (char c : output) System.out.print(c);\n System.out.println();\n }\n }\n\n public static char[] change(char[] input, int length, int n) {\n char[] output = new char[length];\n\n for (int i = 0; i < length - n; i++) {\n output[i] = input[i+n];\n }\n for (int i = length - n; i < length; i++) {\n output[i] = input[i + n - length];\n }\n\n return output;\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String input;
int m;
while (!(input = sc.next()).equals("-")) {
m = sc.nextInt();
int[] h = new int[m];
char[] output = new char[input.length()];
for (int i = 0; i < m; i++) {
h[i] = sc.nextInt();
}
for (int i = 0; i < input.length(); i++) {
output[i] = input.charAt(i);
}
for (int i = 0; i < m; i++) {
output = change(output, input.length(), h[i]);
}
for (char c : output) System.out.print(c);
System.out.println();
}
}
public static char[] change(char[] input, int length, int n) {
char[] output = new char[length];
for (int i = 0; i < length - n; i++) {
output[i] = input[i+n];
}
for (int i = length - n; i < length; i++) {
output[i] = input[i + n - length];
}
return output;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
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
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
44,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
44,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]){\n\n\t\t//?????£????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String args[]){\n\n\t\t//?????£????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]){\n\n\t\t//?????£????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}\n\t}",
"main",
"{\n\n\t\t//?????£????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}",
"true",
"{\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}",
"String moji = sc.next();",
"moji",
"sc.next()",
"sc.next",
"sc",
"if(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}",
"moji.equals(\"-\")",
"moji.equals",
"moji",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}",
"{\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String left = moji.substring(0,c);",
"left",
"moji.substring(0,c)",
"moji.substring",
"moji",
"0",
"c",
"String right = moji.substring(c);",
"right",
"moji.substring(c)",
"moji.substring",
"moji",
"c",
"moji = right + left",
"moji",
"right + left",
"right",
"left",
"System.out.println(moji)",
"System.out.println",
"System.out",
"System",
"System.out",
"moji",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]){\n\n\t\t//?????£????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]){\n\n\t\t//?????£????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true){\n\t\t\tString moji = sc.next();\n\n\t\t\t//?????????-?????£????????????\n\t\t\tif(moji.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//??°??????????????°???????????????\n\t\t\tint h = sc.nextInt();\n\n\t\t\t//\n\t\t\tfor(int i = 0; i < h; i++){\n\t\t\t\tint c = sc.nextInt();\n\n\t\t\t\tString left = moji.substring(0,c);\n\t\t\t\tString right = moji.substring(c);\n\n\t\t\t\tmoji = right + left ;\n\t\t\t}\n\n\t\t\tSystem.out.println(moji);\n\t\t}\n\t}\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String args[]){
//?????£????????????????????????????????????
Scanner sc = new Scanner(System.in);
while(true){
String moji = sc.next();
//?????????-?????£????????????
if(moji.equals("-")){
break;
}
//??°??????????????°???????????????
int h = sc.nextInt();
//
for(int i = 0; i < h; i++){
int c = sc.nextInt();
String left = moji.substring(0,c);
String right = moji.substring(c);
moji = right + left ;
}
System.out.println(moji);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
20,
4,
18,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
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
],
[
95,
11
],
[
95,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
22,
35
],
[
35,
36
],
[
35,
37
],
[
22,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
22,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
22,
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
],
[
68,
69
],
[
69,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
74,
78
],
[
62,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
22,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
90,
91
],
[
12,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
]
| [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"while(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}",
"true",
"{\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"if(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"StringBuffer sb = new StringBuffer();",
"sb",
"new StringBuffer()",
"sb.append(str)",
"sb.append",
"sb",
"str",
"int count = Integer.parseInt(br.readLine());",
"count",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < count",
"i",
"count",
"i++",
"i++",
"i",
"{\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}",
"{\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}",
"int indexNum = Integer.parseInt(br.readLine());",
"indexNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"sb.append(sb.substring(0, indexNum))",
"sb.append",
"sb",
"sb.substring(0, indexNum)",
"sb.substring",
"sb",
"0",
"indexNum",
"sb.delete(0, indexNum)",
"sb.delete",
"sb",
"0",
"indexNum",
"System.out.println(sb.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"sb.toString()",
"sb.toString",
"sb",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\twhile(true){\n\t\t\tstr = br.readLine();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tsb.append(str);\n\t\t\tint count = Integer.parseInt(br.readLine());\n\n\t\t\tfor(int i = 0; i < count; i++){\n\t\t\t\tint indexNum = Integer.parseInt(br.readLine());\n\n\t\t\t\tsb.append(sb.substring(0, indexNum));\n\t\t\t\tsb.delete(0, indexNum);\n\n\t\t\t}\n\t\t\tSystem.out.println(sb.toString());\n\t\t}\n\t}\n}",
"Main"
]
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while(true){
str = br.readLine();
if(str.equals("-")){
break;
}
StringBuffer sb = new StringBuffer();
sb.append(str);
int count = Integer.parseInt(br.readLine());
for(int i = 0; i < count; i++){
int indexNum = Integer.parseInt(br.readLine());
sb.append(sb.substring(0, indexNum));
sb.delete(0, indexNum);
}
System.out.println(sb.toString());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
4,
18,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
14,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
14,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
8,
73
],
[
73,
74
],
[
74,
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 sc = new Scanner(System.in);\nwhile (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}\nsc.close();\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);\nwhile (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}\nsc.close();\n}\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\nwhile (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}\nsc.close();\n}",
"main",
"{\n Scanner sc = new Scanner(System.in);\nwhile (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}\nsc.close();\n}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}",
"true",
"{\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"if (str.equals(\"-\"))break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int leng = str.length();",
"leng",
"str.length()",
"str.length",
"str",
"int shuffle = sc.nextInt();",
"shuffle",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<shuffle",
"i",
"shuffle",
"i++",
"i++",
"i",
"{\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}",
"{\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"str = str.substring(n, leng) + str.substring(0, n)",
"str",
"str.substring(n, leng) + str.substring(0, n)",
"str.substring(n, leng)",
"str.substring",
"str",
"n",
"leng",
"str.substring(0, n)",
"str.substring",
"str",
"0",
"n",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"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);\nwhile (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}\nsc.close();\n}\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\nwhile (true){\nString str = sc.next();\nif (str.equals(\"-\"))break;\nint leng = str.length();\nint shuffle = sc.nextInt();\nfor(int i=0;i<shuffle;i++){\nint n = sc.nextInt();\nstr = str.substring(n, leng) + str.substring(0, n);\n}\nSystem.out.println(str);\n}\nsc.close();\n}\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true){
String str = sc.next();
if (str.equals("-"))break;
int leng = str.length();
int shuffle = sc.nextInt();
for(int i=0;i<shuffle;i++){
int n = sc.nextInt();
str = str.substring(n, leng) + str.substring(0, n);
}
System.out.println(str);
}
sc.close();
}
}
|
[
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,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
0,
13,
18,
13,
13,
0,
13,
20,
2,
13,
17,
0,
13,
17,
0,
13,
17,
0,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
13,
4,
13,
11,
1,
41,
13,
13,
2,
13,
13,
1,
0,
13,
4,
13,
13,
30,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
17,
2,
13,
17,
23,
13,
12,
13,
30,
0,
18,
13,
13,
13,
0,
13,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
17,
0,
13,
4,
13,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
209,
8
],
[
209,
9
],
[
9,
10
],
[
209,
11
],
[
11,
12
],
[
209,
13
],
[
13,
14
],
[
209,
15
],
[
15,
16
],
[
209,
17
],
[
17,
18
],
[
209,
19
],
[
19,
20
],
[
209,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
35,
40
],
[
40,
41
],
[
29,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
29,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
29,
53
],
[
53,
54
],
[
53,
55
],
[
56,
57
],
[
56,
58
],
[
29,
59
],
[
59,
60
],
[
59,
61
],
[
29,
62
],
[
62,
63
],
[
62,
64
],
[
29,
65
],
[
65,
66
],
[
65,
67
],
[
29,
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
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
29,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
29,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
105,
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
],
[
29,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
128,
142
],
[
143,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
29,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
23,
155
],
[
155,
156
],
[
156,
157
],
[
21,
158
],
[
158,
159
],
[
209,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
168,
170
],
[
160,
171
],
[
171,
172
],
[
209,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
175,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
183,
185
],
[
173,
186
],
[
186,
187
],
[
209,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
193,
195
],
[
190,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
190,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
203,
205
],
[
190,
206
],
[
206,
207
],
[
0,
208
],
[
208,
209
],
[
208,
210
]
]
| [
"import java.io.IOException;\nimport java.util.Scanner;\npublic class Main {\n\n\tprivate static String q[]; // pueue\n\tprivate static int num; // カードの枚数\n\tprivate static int times; // シャッフルの回数\n\tprivate static String result; // 結果\n\tprivate static int front;\n\tprivate static int rear;\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static int next(int a) {\n\t\treturn (a + 1) % (num+1);\n\t}\n\n\tpublic static void enqueue(String x) {\n\t\tq[rear] = x;\n\t\trear = next(rear);\n\t}\n\n\tpublic static String dequeue() {\n\t\tString x = q[front];\n\t\tq[front] = null;\n\t\tfront = next(front);\n\t\treturn x;\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tprivate static String q[]; // pueue\n\tprivate static int num; // カードの枚数\n\tprivate static int times; // シャッフルの回数\n\tprivate static String result; // 結果\n\tprivate static int front;\n\tprivate static int rear;\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static int next(int a) {\n\t\treturn (a + 1) % (num+1);\n\t}\n\n\tpublic static void enqueue(String x) {\n\t\tq[rear] = x;\n\t\trear = next(rear);\n\t}\n\n\tpublic static String dequeue() {\n\t\tString x = q[front];\n\t\tq[front] = null;\n\t\tfront = next(front);\n\t\treturn x;\n\t}\n}",
"Main",
"private static String q[]; // pueue",
"q",
"private static int num; // カードの枚数",
"num",
"private static int times; // シャッフルの回数",
"times",
"private static String result; // 結果",
"result",
"private static int front;",
"front",
"private static int rear;",
"rear",
"public static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}",
"true",
"{\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"String[] array = s.split(\"\");",
"array",
"s.split(\"\")",
"s.split",
"s",
"\"\"",
"num = array.length",
"num",
"array.length",
"array",
"array.length",
"q = new String[num+1]",
"q",
"new String[num+1]",
"num+1",
"num",
"1",
"result = \"\"",
"result",
"\"\"",
"front = 0",
"front",
"0",
"rear = num",
"rear",
"num",
"for(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<num",
"i",
"num",
"i++",
"i++",
"i",
"{\n\t\t\t\tq[i] = array[i];\n\t\t\t}",
"{\n\t\t\t\tq[i] = array[i];\n\t\t\t}",
"q[i] = array[i]",
"q[i]",
"q",
"i",
"array[i]",
"array",
"i",
"times = sc.nextInt()",
"times",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}",
"int tmp = sc.nextInt();",
"tmp",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<tmp",
"j",
"tmp",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}",
"{\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}",
"enqueue(dequeue())",
"enqueue",
"dequeue()",
"dequeue",
"for(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}",
"int i=front;",
"int i=front;",
"i",
"front",
"i!=rear",
"i",
"rear",
"i=next(i)",
"i=next(i)",
"i",
"next(i)",
"next",
"i",
"{\n\t\t\t\tresult += q[i];\n\t\t\t}",
"{\n\t\t\t\tresult += q[i];\n\t\t\t}",
"result += q[i]",
"result",
"q[i]",
"q",
"i",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public static int next(int a) {\n\t\treturn (a + 1) % (num+1);\n\t}",
"next",
"{\n\t\treturn (a + 1) % (num+1);\n\t}",
"return (a + 1) % (num+1);",
"(a + 1) % (num+1)",
"(a + 1)",
"a",
"1",
"(num+1)",
"num",
"1",
"int a",
"a",
"public static void enqueue(String x) {\n\t\tq[rear] = x;\n\t\trear = next(rear);\n\t}",
"enqueue",
"{\n\t\tq[rear] = x;\n\t\trear = next(rear);\n\t}",
"q[rear] = x",
"q[rear]",
"q",
"rear",
"x",
"rear = next(rear)",
"rear",
"next(rear)",
"next",
"rear",
"String x",
"x",
"public static String dequeue() {\n\t\tString x = q[front];\n\t\tq[front] = null;\n\t\tfront = next(front);\n\t\treturn x;\n\t}",
"dequeue",
"{\n\t\tString x = q[front];\n\t\tq[front] = null;\n\t\tfront = next(front);\n\t\treturn x;\n\t}",
"String x = q[front];",
"x",
"q[front]",
"q",
"front",
"q[front] = null",
"q[front]",
"q",
"front",
"null",
"front = next(front)",
"front",
"next(front)",
"next",
"front",
"return x;",
"x",
"public class Main {\n\n\tprivate static String q[]; // pueue\n\tprivate static int num; // カードの枚数\n\tprivate static int times; // シャッフルの回数\n\tprivate static String result; // 結果\n\tprivate static int front;\n\tprivate static int rear;\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static int next(int a) {\n\t\treturn (a + 1) % (num+1);\n\t}\n\n\tpublic static void enqueue(String x) {\n\t\tq[rear] = x;\n\t\trear = next(rear);\n\t}\n\n\tpublic static String dequeue() {\n\t\tString x = q[front];\n\t\tq[front] = null;\n\t\tfront = next(front);\n\t\treturn x;\n\t}\n}",
"public class Main {\n\n\tprivate static String q[]; // pueue\n\tprivate static int num; // カードの枚数\n\tprivate static int times; // シャッフルの回数\n\tprivate static String result; // 結果\n\tprivate static int front;\n\tprivate static int rear;\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(true) {\n\t\t\tString s = sc.next();\n\t\t\tif(s.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] array = s.split(\"\");\n\t\t\tnum = array.length;\n\t\t\tq = new String[num+1];\n\t\t\tresult = \"\";\n\t\t\tfront = 0;\n\t\t\trear = num;\n\n\t\t\tfor(int i=0;i<num;i++) {\n\t\t\t\tq[i] = array[i];\n\t\t\t}\n\t\t\ttimes = sc.nextInt();\n\t\t\tfor(int i=0;i<times;i++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tfor(int j=0;j<tmp;j++) {\n\t\t\t\t\tenqueue(dequeue());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(int i=front;i!=rear;i=next(i)) {\n\t\t\t\tresult += q[i];\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static int next(int a) {\n\t\treturn (a + 1) % (num+1);\n\t}\n\n\tpublic static void enqueue(String x) {\n\t\tq[rear] = x;\n\t\trear = next(rear);\n\t}\n\n\tpublic static String dequeue() {\n\t\tString x = q[front];\n\t\tq[front] = null;\n\t\tfront = next(front);\n\t\treturn x;\n\t}\n}",
"Main"
]
| import java.io.IOException;
import java.util.Scanner;
public class Main {
private static String q[]; // pueue
private static int num; // カードの枚数
private static int times; // シャッフルの回数
private static String result; // 結果
private static int front;
private static int rear;
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(System.in);
while(true) {
String s = sc.next();
if(s.equals("-")) {
break;
}
String[] array = s.split("");
num = array.length;
q = new String[num+1];
result = "";
front = 0;
rear = num;
for(int i=0;i<num;i++) {
q[i] = array[i];
}
times = sc.nextInt();
for(int i=0;i<times;i++) {
int tmp = sc.nextInt();
for(int j=0;j<tmp;j++) {
enqueue(dequeue());
}
}
for(int i=front;i!=rear;i=next(i)) {
result += q[i];
}
System.out.println(result);
}
sc.close();
}
public static int next(int a) {
return (a + 1) % (num+1);
}
public static void enqueue(String x) {
q[rear] = x;
rear = next(rear);
}
public static String dequeue() {
String x = q[front];
q[front] = null;
front = next(front);
return x;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
13,
0,
13,
2,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
14,
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
46,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
60,
64
],
[
46,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
14,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
8,
76
],
[
76,
77
],
[
77,
78
],
[
6,
79
],
[
79,
80
]
]
| [
"import java.util.Scanner;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n while(true){\n String S = sc.next();\n \tif(S.equals(\"-\"))\n break;\n String s = S;\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }\n System.out.println(s);\n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n while(true){\n String S = sc.next();\n \tif(S.equals(\"-\"))\n break;\n String s = S;\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }\n System.out.println(s);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n while(true){\n String S = sc.next();\n \tif(S.equals(\"-\"))\n break;\n String s = S;\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }\n System.out.println(s);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n while(true){\n String S = sc.next();\n \tif(S.equals(\"-\"))\n break;\n String s = S;\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }\n System.out.println(s);\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n String S = sc.next();\n \tif(S.equals(\"-\"))\n break;\n String s = S;\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }\n System.out.println(s);\n }",
"true",
"{\n String S = sc.next();\n \tif(S.equals(\"-\"))\n break;\n String s = S;\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }\n System.out.println(s);\n }",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"if(S.equals(\"-\"))\n break;",
"S.equals(\"-\")",
"S.equals",
"S",
"\"-\"",
"break;",
"String s = S;",
"s",
"S",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }",
"{\n int h = sc.nextInt();\n \tString s1 = s.substring(h);\n \tString s2 = s.substring(0,h);\n \t\ts = s1 + s2;\n }",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String s1 = s.substring(h);",
"s1",
"s.substring(h)",
"s.substring",
"s",
"h",
"String s2 = s.substring(0,h);",
"s2",
"s.substring(0,h)",
"s.substring",
"s",
"0",
"h",
"s = s1 + s2",
"s",
"s1 + s2",
"s1",
"s2",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(true){
String S = sc.next();
if(S.equals("-"))
break;
String s = S;
int m = sc.nextInt();
for(int i=0;i<m;i++){
int h = sc.nextInt();
String s1 = s.substring(h);
String s2 = s.substring(0,h);
s = s1 + s2;
}
System.out.println(s);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
20,
41,
13,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
0,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
13,
30,
40,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
13,
13,
4,
18,
13,
2,
13,
17,
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
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
28,
35
],
[
26,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
36,
48
],
[
48,
49
],
[
48,
50
],
[
36,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
55,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
55,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
36,
82
],
[
82,
83
],
[
83,
84
],
[
82,
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.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuffer sb1 = null;\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString cards;\n\t\twhile (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb2);\n\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuffer sb1 = null;\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString cards;\n\t\twhile (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb2);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuffer sb1 = null;\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString cards;\n\t\twhile (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb2);\n\n\t}",
"main",
"{\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuffer sb1 = null;\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString cards;\n\t\twhile (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb2);\n\n\t}",
"BufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));",
"input",
"new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in))",
"StringBuffer sb1 = null;",
"sb1",
"null",
"StringBuffer sb2 = new StringBuffer();",
"sb2",
"new StringBuffer()",
"String cards;",
"cards",
"while (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}",
"!(cards = input.readLine()).equals(\"-\")",
"(cards = input.readLine()).equals(\"-\")",
"(cards = input.readLine()).equals",
"(cards = input.readLine())",
"cards",
"input.readLine()",
"input.readLine",
"input",
"\"-\"",
"{\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}",
"sb1 = new StringBuffer(cards)",
"sb1",
"new StringBuffer(cards)",
"int shuffle = Integer.parseInt(input.readLine());",
"shuffle",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"int i = 0;",
"i",
"0",
"while (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}",
"i != shuffle",
"i",
"shuffle",
"{\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}",
"i++",
"i",
"int n = Integer.parseInt(input.readLine());",
"n",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"String str = sb1.substring(0, n);",
"str",
"sb1.substring(0, n)",
"sb1.substring",
"sb1",
"0",
"n",
"sb1.delete(0, n)",
"sb1.delete",
"sb1",
"0",
"n",
"sb1.append(str)",
"sb1.append",
"sb1",
"str",
"sb2.append(sb1 + \"\\n\")",
"sb2.append",
"sb2",
"sb1 + \"\\n\"",
"sb1",
"\"\\n\"",
"System.out.print(sb2)",
"System.out.print",
"System.out",
"System",
"System.out",
"sb2",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuffer sb1 = null;\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString cards;\n\t\twhile (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb2);\n\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuffer sb1 = null;\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString cards;\n\t\twhile (!(cards = input.readLine()).equals(\"-\")) {\n\t\t\tsb1 = new StringBuffer(cards);\n\t\t\tint shuffle = Integer.parseInt(input.readLine());\n\t\t\tint i = 0;\n\n\t\t\twhile (i != shuffle) {\n\t\t\t\ti++;\n\t\t\t\tint n = Integer.parseInt(input.readLine());\n\t\t\t\tString str = sb1.substring(0, n);\n\t\t\t\tsb1.delete(0, n);\n\t\t\t\tsb1.append(str);\n\t\t\t}\n\t\t\tsb2.append(sb1 + \"\\n\");\n\t\t}\n\t\tSystem.out.print(sb2);\n\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(
System.in));
StringBuffer sb1 = null;
StringBuffer sb2 = new StringBuffer();
String cards;
while (!(cards = input.readLine()).equals("-")) {
sb1 = new StringBuffer(cards);
int shuffle = Integer.parseInt(input.readLine());
int i = 0;
while (i != shuffle) {
i++;
int n = Integer.parseInt(input.readLine());
String str = sb1.substring(0, n);
sb1.delete(0, n);
sb1.append(str);
}
sb2.append(sb1 + "\n");
}
System.out.print(sb2);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
11,
1,
40,
4,
18,
4,
18,
13,
17,
1,
0,
13,
20,
30,
30,
41,
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,
0,
13,
2,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
90,
5
],
[
90,
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
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
18,
23
],
[
15,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
15,
28
],
[
29,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
29,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
29,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
29,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
29,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
29,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
6,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStringBuffer cards = new StringBuffer(sc.next());\n\t\t\n\t\tfor (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\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\n\t\tStringBuffer cards = new StringBuffer(sc.next());\n\t\t\n\t\tfor (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}\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\tStringBuffer cards = new StringBuffer(sc.next());\n\t\t\n\t\tfor (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStringBuffer cards = new StringBuffer(sc.next());\n\t\t\n\t\tfor (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"StringBuffer cards = new StringBuffer(sc.next());",
"cards",
"new StringBuffer(sc.next())",
"for (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}",
";",
"!cards.toString().equals(\"-\")",
"cards.toString().equals(\"-\")",
"cards.toString().equals",
"cards.toString()",
"cards.toString",
"cards",
"\"-\"",
"cards = new StringBuffer(sc.next())",
"cards = new StringBuffer(sc.next())",
"cards",
"new StringBuffer(sc.next())",
"{\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}",
"{\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}",
"{\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}",
"sum += sc.nextInt()",
"sum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sum = sum % cards.length()",
"sum",
"sum % cards.length()",
"sum",
"cards.length()",
"cards.length",
"cards",
"cards = cards.append(cards.substring(0, sum))",
"cards",
"cards.append(cards.substring(0, sum))",
"cards.append",
"cards",
"cards.substring(0, sum)",
"cards.substring",
"cards",
"0",
"sum",
"cards.delete(0, sum)",
"cards.delete",
"cards",
"0",
"sum",
"System.out.println(cards)",
"System.out.println",
"System.out",
"System",
"System.out",
"cards",
"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\n\t\tStringBuffer cards = new StringBuffer(sc.next());\n\t\t\n\t\tfor (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStringBuffer cards = new StringBuffer(sc.next());\n\t\t\n\t\tfor (; !cards.toString().equals(\"-\"); cards = new StringBuffer(sc.next())) {\n\t\t\tint m = sc.nextInt();\n\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum += sc.nextInt();\n\t\t\t}\n\t\t\tsum = sum % cards.length();\n\t\t\tcards = cards.append(cards.substring(0, sum));\n\t\t\tcards.delete(0, sum);\n\n\t\t\tSystem.out.println(cards);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuffer cards = new StringBuffer(sc.next());
for (; !cards.toString().equals("-"); cards = new StringBuffer(sc.next())) {
int m = sc.nextInt();
int sum = 0;
for (int i = 0; i < m; i++) {
sum += sc.nextInt();
}
sum = sum % cards.length();
cards = cards.append(cards.substring(0, sum));
cards.delete(0, sum);
System.out.println(cards);
}
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
30,
41,
13,
4,
18,
13,
41,
13,
20,
28,
13,
13,
30,
30,
4,
18,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
42,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
113,
5
],
[
113,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
33,
34
],
[
33,
35
],
[
27,
36
],
[
36,
37
],
[
36,
38
],
[
36,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
27,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
27,
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
],
[
62,
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
],
[
84,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
27,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
27,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
6,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\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\twhile(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}",
"String str=sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"if(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}",
"char[] ar = str.toCharArray();",
"ar",
"str.toCharArray()",
"str.toCharArray",
"str",
"Queue<Character> q = new LinkedList<Character>();",
"q",
"new LinkedList<Character>()",
"for(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}",
"char ch",
"ar",
"{\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}",
"{\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}",
"q.offer(ch)",
"q.offer",
"q",
"ch",
"int m=sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}",
"int h=sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<h",
"j",
"h",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}",
"char ch=q.poll();",
"ch",
"q.poll()",
"q.poll",
"q",
"q.offer(ch)",
"q.offer",
"q",
"ch",
"while(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}",
"q.size()>0",
"q.size()",
"q.size",
"q",
"0",
"{\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}",
"System.out.print(q.poll())",
"System.out.print",
"System.out",
"System",
"System.out",
"q.poll()",
"q.poll",
"q",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tchar[] ar = str.toCharArray();\n\t\t\t\tQueue<Character> q = new LinkedList<Character>();\n\t\t\t\tfor(char ch:ar){\n\t\t\t\t\tq.offer(ch);\n\t\t\t\t}\n\t\t\t\tint m=sc.nextInt();\n\t\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\t\tint h=sc.nextInt();\n\t\t\t\t\tfor(int j=0;j<h;j++){\n\t\t\t\t\t\tchar ch=q.poll();\n\t\t\t\t\t\tq.offer(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(q.size()>0){\n\t\t\t\t\tSystem.out.print(q.poll());\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(true){
String str=sc.next();
if(str.equals("-")){
break;
}else{
char[] ar = str.toCharArray();
Queue<Character> q = new LinkedList<Character>();
for(char ch:ar){
q.offer(ch);
}
int m=sc.nextInt();
for(int i=0;i<m;i++){
int h=sc.nextInt();
for(int j=0;j<h;j++){
char ch=q.poll();
q.offer(ch);
}
}
while(q.size()>0){
System.out.print(q.poll());
}
System.out.println();
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
80,
5
],
[
80,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
18,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
18,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
18,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
47,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
47,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
18,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
6,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int m,h;\n \n while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }\n }\n}\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 m,h;\n \n while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int m,h;\n \n while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int m,h;\n \n while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int m",
"m",
"h;",
"h",
"while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }",
"true",
"{\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }",
"String c = sc.next();",
"c",
"sc.next()",
"sc.next",
"sc",
"if(c.equals(\"-\"))\n break;",
"c.equals(\"-\")",
"c.equals",
"c",
"\"-\"",
"break;",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }",
"{\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String head=c.substring(0,h);",
"head",
"c.substring(0,h)",
"c.substring",
"c",
"0",
"h",
"String tail=c.substring(h);",
"tail",
"c.substring(h)",
"c.substring",
"c",
"h",
"c=tail + head",
"c",
"tail + head",
"tail",
"head",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int m,h;\n \n while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int m,h;\n \n while(true){\n String c = sc.next();\n if(c.equals(\"-\"))\n break;\n \n m = sc.nextInt();\n for(int i=0;i<m;i++){\n h = sc.nextInt();\n String head=c.substring(0,h);\n String tail=c.substring(h);\n c=tail + head;\n }\n System.out.println(c);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int m,h;
while(true){
String c = sc.next();
if(c.equals("-"))
break;
m = sc.nextInt();
for(int i=0;i<m;i++){
h = sc.nextInt();
String head=c.substring(0,h);
String tail=c.substring(h);
c=tail + head;
}
System.out.println(c);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
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
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
17,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
17,
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
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
55,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
55,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
17,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
]
| [
"//import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n//\t\tArrayList<String> ansBox=new ArrayList<String>();\n\t\tString c=\"\";\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\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\tArrayList<String> ansBox=new ArrayList<String>();\n\t\tString c=\"\";\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n//\t\tArrayList<String> ansBox=new ArrayList<String>();\n\t\tString c=\"\";\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}",
"main",
"{\n//\t\tArrayList<String> ansBox=new ArrayList<String>();\n\t\tString c=\"\";\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}",
"String c=\"\";",
"c",
"\"\"",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}",
"true",
"{//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}",
"String str=sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"int n=str.length();",
"n",
"str.length()",
"str.length",
"str",
"if(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int m=Integer.parseInt(sc.next());",
"m",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}",
"{\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}",
"int h=Integer.parseInt(sc.next());",
"h",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"String a=str.substring(0,h);",
"a",
"str.substring(0,h)",
"str.substring",
"str",
"0",
"h",
"String b=str.substring(h,n);",
"b",
"str.substring(h,n)",
"str.substring",
"str",
"h",
"n",
"str=b+a",
"str",
"b+a",
"b",
"a",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) {\n//\t\tArrayList<String> ansBox=new ArrayList<String>();\n\t\tString c=\"\";\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n//\t\tArrayList<String> ansBox=new ArrayList<String>();\n\t\tString c=\"\";\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(true) {//\"-\"が入力されるまで繰り返す\n\t\t\t//文字列入力\n\t\t\tString str=sc.next();\n\t\t\tint n=str.length();\n\t\t\tif(str.equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//シャッフル回数m入力\n\t\t\tint m=Integer.parseInt(sc.next());\n\n\t\t\t//シャッフルする番号入力//m回シャッフルする\n\t\t\tfor(int i=0;i<m;i++) {\n\t\t\t\tint h=Integer.parseInt(sc.next());\n\t\t\t\t//strから文字列を切り分け\n\t\t\t\tString a=str.substring(0,h);\n\t\t\t\tString b=str.substring(h,n);\n\t\t\t\tstr=b+a;\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}\n\n}",
"Main"
]
| //import java.util.ArrayList;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
// ArrayList<String> ansBox=new ArrayList<String>();
String c="";
Scanner sc=new Scanner(System.in);
while(true) {//"-"が入力されるまで繰り返す
//文字列入力
String str=sc.next();
int n=str.length();
if(str.equals("-")) {
break;
}
//シャッフル回数m入力
int m=Integer.parseInt(sc.next());
//シャッフルする番号入力//m回シャッフルする
for(int i=0;i<m;i++) {
int h=Integer.parseInt(sc.next());
//strから文字列を切り分け
String a=str.substring(0,h);
String b=str.substring(h,n);
str=b+a;
}
System.out.println(str);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
13,
3,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
2,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
25,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
25,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
54,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
54,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
74,
78
],
[
25,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tfinal String END = \"-\";\n\t\tString word;\n\t\tString str;\n\t\tint m;\n\t\tint h;\n\t\t\n\t\tdo {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);\n\t\t\n\t}\n}\n",
"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\tfinal String END = \"-\";\n\t\tString word;\n\t\tString str;\n\t\tint m;\n\t\tint h;\n\t\t\n\t\tdo {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);\n\t\t\n\t}\n}",
"Main",
"public static void main(String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tfinal String END = \"-\";\n\t\tString word;\n\t\tString str;\n\t\tint m;\n\t\tint h;\n\t\t\n\t\tdo {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);\n\t\t\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner (System.in);\n\t\tfinal String END = \"-\";\n\t\tString word;\n\t\tString str;\n\t\tint m;\n\t\tint h;\n\t\t\n\t\tdo {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);\n\t\t\n\t}",
"Scanner scan = new Scanner (System.in);",
"scan",
"new Scanner (System.in)",
"final String END = \"-\";",
"END",
"\"-\"",
"String word;",
"word",
"String str;",
"str",
"int m;",
"m",
"int h;",
"h",
"do {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);",
"true",
"{\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t}",
"word = scan.next()",
"word",
"scan.next()",
"scan.next",
"scan",
"if (word.equals(END)) break;",
"word.equals(END)",
"word.equals",
"word",
"END",
"break;",
"m = scan.nextInt()",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}",
"{\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}",
"h = scan.nextInt()",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"str = word + word",
"str",
"word + word",
"word",
"word",
"int hh = h + word.length();",
"hh",
"h + word.length()",
"h",
"word.length()",
"word.length",
"word",
"word = str.substring(h, hh)",
"word",
"str.substring(h, hh)",
"str.substring",
"str",
"h",
"hh",
"System.out.println(word)",
"System.out.println",
"System.out",
"System",
"System.out",
"word",
"String [] args",
"args",
"public class Main {\n\tpublic static void main(String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tfinal String END = \"-\";\n\t\tString word;\n\t\tString str;\n\t\tint m;\n\t\tint h;\n\t\t\n\t\tdo {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tfinal String END = \"-\";\n\t\tString word;\n\t\tString str;\n\t\tint m;\n\t\tint h;\n\t\t\n\t\tdo {\n\t\t\tword = scan.next();\n\t\t\tif (word.equals(END)) break;\n\t\t\tm = scan.nextInt();\n\t\t\t\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\th = scan.nextInt();\n\t\t\t\tstr = word + word;\n\t\t\t\tint hh = h + word.length();\n\t\t\t\tword = str.substring(h, hh);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(word);\n\t\t\t\n\t\t} while(true);\n\t\t\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String [] args) {
Scanner scan = new Scanner (System.in);
final String END = "-";
String word;
String str;
int m;
int h;
do {
word = scan.next();
if (word.equals(END)) break;
m = scan.nextInt();
for (int i = 0; i < m; i++) {
h = scan.nextInt();
str = word + word;
int hh = h + word.length();
word = str.substring(h, hh);
}
System.out.println(word);
} while(true);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
0,
13,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
0,
13,
2,
13,
13,
0,
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
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
43,
48
],
[
48,
49
],
[
37,
50
],
[
50,
51
],
[
50,
52
],
[
37,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
37,
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
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
70,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
70,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
37,
94
],
[
94,
95
],
[
94,
96
],
[
37,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
]
]
| [
"import java.util.Scanner;\n\n/**\n * @author kawakami\n *\n */\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString mot = \"\";\n\t\tString fro = \"\";\n\t\tString bac = \"\"; \n\t\tString str;\n\t\tString shu = \"\";\n\t\t\n\t\t\n\t\t\n\t\tint count = 0;\n\t\tint i = 0;\n\t\tint h = 0;\n\t\t\n\t\t\n\t\twhile(true){\n\t\t\t\n\t\t\t//System.out.println(\"word please\");\n\t\t\tmot = as.next();\n\t\t\t//System.out.println(mot+\"::\");\n\t\t\t\n\t\t\tif(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tshu = mot;\n\t\t\t//System.out.println(\"number please\");\n\t\t\tcount = as.nextInt();\n\t\t\t\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstr = shu;\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString mot = \"\";\n\t\tString fro = \"\";\n\t\tString bac = \"\"; \n\t\tString str;\n\t\tString shu = \"\";\n\t\t\n\t\t\n\t\t\n\t\tint count = 0;\n\t\tint i = 0;\n\t\tint h = 0;\n\t\t\n\t\t\n\t\twhile(true){\n\t\t\t\n\t\t\t//System.out.println(\"word please\");\n\t\t\tmot = as.next();\n\t\t\t//System.out.println(mot+\"::\");\n\t\t\t\n\t\t\tif(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tshu = mot;\n\t\t\t//System.out.println(\"number please\");\n\t\t\tcount = as.nextInt();\n\t\t\t\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstr = shu;\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString mot = \"\";\n\t\tString fro = \"\";\n\t\tString bac = \"\"; \n\t\tString str;\n\t\tString shu = \"\";\n\t\t\n\t\t\n\t\t\n\t\tint count = 0;\n\t\tint i = 0;\n\t\tint h = 0;\n\t\t\n\t\t\n\t\twhile(true){\n\t\t\t\n\t\t\t//System.out.println(\"word please\");\n\t\t\tmot = as.next();\n\t\t\t//System.out.println(mot+\"::\");\n\t\t\t\n\t\t\tif(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tshu = mot;\n\t\t\t//System.out.println(\"number please\");\n\t\t\tcount = as.nextInt();\n\t\t\t\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstr = shu;\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString mot = \"\";\n\t\tString fro = \"\";\n\t\tString bac = \"\"; \n\t\tString str;\n\t\tString shu = \"\";\n\t\t\n\t\t\n\t\t\n\t\tint count = 0;\n\t\tint i = 0;\n\t\tint h = 0;\n\t\t\n\t\t\n\t\twhile(true){\n\t\t\t\n\t\t\t//System.out.println(\"word please\");\n\t\t\tmot = as.next();\n\t\t\t//System.out.println(mot+\"::\");\n\t\t\t\n\t\t\tif(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tshu = mot;\n\t\t\t//System.out.println(\"number please\");\n\t\t\tcount = as.nextInt();\n\t\t\t\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstr = shu;\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\n\t}",
"Scanner as = new Scanner(System.in);",
"as",
"new Scanner(System.in)",
"String mot = \"\";",
"mot",
"\"\"",
"String fro = \"\";",
"fro",
"\"\"",
"String bac = \"\";",
"bac",
"\"\"",
"String str;",
"str",
"String shu = \"\";",
"shu",
"\"\"",
"int count = 0;",
"count",
"0",
"int i = 0;",
"i",
"0",
"int h = 0;",
"h",
"0",
"while(true){\n\t\t\t\n\t\t\t//System.out.println(\"word please\");\n\t\t\tmot = as.next();\n\t\t\t//System.out.println(mot+\"::\");\n\t\t\t\n\t\t\tif(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tshu = mot;\n\t\t\t//System.out.println(\"number please\");\n\t\t\tcount = as.nextInt();\n\t\t\t\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstr = shu;\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}",
"true",
"{\n\t\t\t\n\t\t\t//System.out.println(\"word please\");\n\t\t\tmot = as.next();\n\t\t\t//System.out.println(mot+\"::\");\n\t\t\t\n\t\t\tif(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tshu = mot;\n\t\t\t//System.out.println(\"number please\");\n\t\t\tcount = as.nextInt();\n\t\t\t\n\t\t\tfor(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstr = shu;\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}",
"mot = as.next()",
"mot",
"as.next()",
"as.next",
"as",
"if(mot.equals(\"-\")){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}",
"mot.equals(\"-\")",
"mot.equals",
"mot",
"\"-\"",
"{\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}",
"break;",
"shu = mot",
"shu",
"mot",
"count = as.nextInt()",
"count",
"as.nextInt()",
"as.nextInt",
"as",
"for(i=0;i<count;i++){\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<count",
"i",
"count",
"i++",
"i++",
"i",
"{\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\th = as.nextInt();\n\t\t\t\t\n\t\t\t\tfro = shu.substring(0,h);\n\t\t\t\tbac = shu.substring(h);\n\t\t\t\tshu = bac + fro;\n\t\t\t\t\n\t\t\t}",
"h = as.nextInt()",
"h",
"as.nextInt()",
"as.nextInt",
"as",
"fro = shu.substring(0,h)",
"fro",
"shu.substring(0,h)",
"shu.substring",
"shu",
"0",
"h",
"bac = shu.substring(h)",
"bac",
"shu.substring(h)",
"shu.substring",
"shu",
"h",
"shu = bac + fro",
"shu",
"bac + fro",
"bac",
"fro",
"str = shu",
"str",
"shu",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args"
]
| import java.util.Scanner;
/**
* @author kawakami
*
*/
class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner as = new Scanner(System.in);
String mot = "";
String fro = "";
String bac = "";
String str;
String shu = "";
int count = 0;
int i = 0;
int h = 0;
while(true){
//System.out.println("word please");
mot = as.next();
//System.out.println(mot+"::");
if(mot.equals("-")){
break;
}
shu = mot;
//System.out.println("number please");
count = as.nextInt();
for(i=0;i<count;i++){
h = as.nextInt();
fro = shu.substring(0,h);
bac = shu.substring(h);
shu = bac + fro;
}
str = shu;
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
40,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
17,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
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
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
47,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
47,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
29,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
29,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String word = sc.next();\n String mae = \"\";\n String usiro = \"\";\n while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }\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 String word = sc.next();\n String mae = \"\";\n String usiro = \"\";\n while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String word = sc.next();\n String mae = \"\";\n String usiro = \"\";\n while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String word = sc.next();\n String mae = \"\";\n String usiro = \"\";\n while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String word = sc.next();",
"word",
"sc.next()",
"sc.next",
"sc",
"String mae = \"\";",
"mae",
"\"\"",
"String usiro = \"\";",
"usiro",
"\"\"",
"while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }",
"!word.equals(\"-\")",
"word.equals(\"-\")",
"word.equals",
"word",
"\"-\"",
"{\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }",
"{\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"usiro = word.substring(a)",
"usiro",
"word.substring(a)",
"word.substring",
"word",
"a",
"mae = word.substring(0,a)",
"mae",
"word.substring(0,a)",
"word.substring",
"word",
"0",
"a",
"word = usiro + mae",
"word",
"usiro + mae",
"usiro",
"mae",
"System.out.println(word)",
"System.out.println",
"System.out",
"System",
"System.out",
"word",
"word = sc.next()",
"word",
"sc.next()",
"sc.next",
"sc",
"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 String word = sc.next();\n String mae = \"\";\n String usiro = \"\";\n while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }\n sc.close();\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String word = sc.next();\n String mae = \"\";\n String usiro = \"\";\n while(!word.equals(\"-\")){\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n usiro = word.substring(a);\n mae = word.substring(0,a);\n word = usiro + mae;\n }\n System.out.println(word);\n word = sc.next();\n }\n sc.close();\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String word = sc.next();
String mae = "";
String usiro = "";
while(!word.equals("-")){
int n = sc.nextInt();
for(int i=0;i<n;i++){
int a = sc.nextInt();
usiro = word.substring(a);
mae = word.substring(0,a);
word = usiro + mae;
}
System.out.println(word);
word = sc.next();
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
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
],
[
88,
8
],
[
88,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
15,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
28,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
28,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
28,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
66,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
71,
75
],
[
28,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
11,
82
],
[
82,
83
],
[
83,
84
],
[
9,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.MissingResourceException;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }\n sc.close();\n }\n}",
"import java.util.MissingResourceException;",
"MissingResourceException",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }",
"catch(MissingResourceException e){\n System.out.println(e);\n }",
"MissingResourceException e",
"{\n System.out.println(e);\n }",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }",
"while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }",
"true",
"{\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"if(line.equals(\"-\")) {\n break;\n }",
"line.equals(\"-\")",
"line.equals",
"line",
"\"-\"",
"{\n break;\n }",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }",
"{\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }",
"int h =sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"line = line.substring(h)+line.substring(0, h)",
"line",
"line.substring(h)+line.substring(0, h)",
"line.substring(h)",
"line.substring",
"line",
"h",
"line.substring(0, h)",
"line.substring",
"line",
"0",
"h",
"System.out.println(line)",
"System.out.println",
"System.out",
"System",
"System.out",
"line",
"sc.close()",
"sc.close",
"sc",
"String[] arg",
"arg",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n try{\n while(true){\n String line = sc.next();\n if(line.equals(\"-\")) {\n break;\n }\n int m = sc.nextInt();\n for(int i=0;i<m;i++){\n int h =sc.nextInt();\n line = line.substring(h)+line.substring(0, h);\n }\n System.out.println(line);\n }\n }catch(MissingResourceException e){\n System.out.println(e);\n }\n sc.close();\n }\n}",
"Main"
]
| import java.util.MissingResourceException;
import java.util.Scanner;
public class Main {
public static void main(String[] arg){
Scanner sc = new Scanner(System.in);
try{
while(true){
String line = sc.next();
if(line.equals("-")) {
break;
}
int m = sc.nextInt();
for(int i=0;i<m;i++){
int h =sc.nextInt();
line = line.substring(h)+line.substring(0, h);
}
System.out.println(line);
}
}catch(MissingResourceException e){
System.out.println(e);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
18,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
18,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
18,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
48,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
48,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
18,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"/**\n\n\n1つのアルファベットが描かれた n 枚のカードの山をシャッフルします。\n\n1回のシャッフルでは、下から h 枚のカードをまとめて取り出し、それを残ったカードの山の上に積み上げます。\n\nカードの山は以下のように1つの文字列で与えられます。\n\n */\n\n//スキャナつかうため\n\nimport java.util.Scanner;\n\npublic class Main {\n\t// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//受け取る文字列、回す数の数の変数宣言\n\t\tString strmoji ;\n\t\tint intSuuji ;\n\t\t//breakされるまで処理を繰り返す\n\t\twhile(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//受け取る文字列、回す数の数の変数宣言\n\t\tString strmoji ;\n\t\tint intSuuji ;\n\t\t//breakされるまで処理を繰り返す\n\t\twhile(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}\n\t}\n}",
"Main",
"// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//受け取る文字列、回す数の数の変数宣言\n\t\tString strmoji ;\n\t\tint intSuuji ;\n\t\t//breakされるまで処理を繰り返す\n\t\twhile(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}\n\t}",
"main",
"{\n\t\t// 入力ストリームの生成\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//受け取る文字列、回す数の数の変数宣言\n\t\tString strmoji ;\n\t\tint intSuuji ;\n\t\t//breakされるまで処理を繰り返す\n\t\twhile(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String strmoji ;",
"strmoji",
"int intSuuji ;",
"intSuuji",
"while(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}",
"true",
"{\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}",
"strmoji = sc.next()",
"strmoji",
"sc.next()",
"sc.next",
"sc",
"if(strmoji.contains(\"-\")){\n break;\n\t\t\t}",
"strmoji.contains(\"-\")",
"strmoji.contains",
"strmoji",
"\"-\"",
"{\n break;\n\t\t\t}",
"break;",
"intSuuji = sc.nextInt()",
"intSuuji",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < intSuuji",
"i",
"intSuuji",
"i ++",
"i ++",
"i",
"{\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}",
"{\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}",
"int intMawasu = sc.nextInt();",
"intMawasu",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String strirekae1 = strmoji.substring(0,intMawasu);",
"strirekae1",
"strmoji.substring(0,intMawasu)",
"strmoji.substring",
"strmoji",
"0",
"intMawasu",
"String strirekae2 = strmoji.substring(intMawasu,strmoji.length());",
"strirekae2",
"strmoji.substring(intMawasu,strmoji.length())",
"strmoji.substring",
"strmoji",
"intMawasu",
"strmoji.length()",
"strmoji.length",
"strmoji",
"strmoji= strirekae2+strirekae1",
"strmoji",
"strirekae2+strirekae1",
"strirekae2",
"strirekae1",
"System.out.println(strmoji)",
"System.out.println",
"System.out",
"System",
"System.out",
"strmoji",
"String[] args",
"args",
"public class Main {\n\t// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//受け取る文字列、回す数の数の変数宣言\n\t\tString strmoji ;\n\t\tint intSuuji ;\n\t\t//breakされるまで処理を繰り返す\n\t\twhile(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}\n\t}\n}",
"public class Main {\n\t// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//受け取る文字列、回す数の数の変数宣言\n\t\tString strmoji ;\n\t\tint intSuuji ;\n\t\t//breakされるまで処理を繰り返す\n\t\twhile(true ){\n\t\t\t//文字列を受け取る\n\t\t\tstrmoji = sc.next();\n\t\t\t//受け取った文字列がーだった場合breakする\n\t\t\tif(strmoji.contains(\"-\")){\n break;\n\t\t\t}\n\t\t\t//受け取る数字の数を受け取る\n\t\t\tintSuuji = sc.nextInt();\n\t\t\t//受け取った数の回数処理を繰り返す\n\t\t\tfor (int i = 0; i < intSuuji ; i ++){\n\t\t\t\t\t//シャッフルする数を受け取る\n\t\t\t\tint intMawasu = sc.nextInt();\n\t\t\t\t//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを\n\t\t\t\t//入れ替え変数にいれる\n\t\t\t\tString strirekae1 = strmoji.substring(0,intMawasu);\n String strirekae2 = strmoji.substring(intMawasu,strmoji.length());\n //分けた文字列を逆にして、strmojiに入れなおす。\n strmoji= strirekae2+strirekae1;\n\n\n\t\t\t}\n\t\t\t//結果表示\n\t\t\tSystem.out.println(strmoji);\n\t\t}\n\t}\n}",
"Main"
]
| /**
1つのアルファベットが描かれた n 枚のカードの山をシャッフルします。
1回のシャッフルでは、下から h 枚のカードをまとめて取り出し、それを残ったカードの山の上に積み上げます。
カードの山は以下のように1つの文字列で与えられます。
*/
//スキャナつかうため
import java.util.Scanner;
public class Main {
// プログラムのエントリポイント
public static void main(String[] args) {
// 入力ストリームの生成
Scanner sc = new Scanner(System.in);
//受け取る文字列、回す数の数の変数宣言
String strmoji ;
int intSuuji ;
//breakされるまで処理を繰り返す
while(true ){
//文字列を受け取る
strmoji = sc.next();
//受け取った文字列がーだった場合breakする
if(strmoji.contains("-")){
break;
}
//受け取る数字の数を受け取る
intSuuji = sc.nextInt();
//受け取った数の回数処理を繰り返す
for (int i = 0; i < intSuuji ; i ++){
//シャッフルする数を受け取る
int intMawasu = sc.nextInt();
//strmojiの0からintmawasuの数 , intmawasuの数から文字列の最大の長さを
//入れ替え変数にいれる
String strirekae1 = strmoji.substring(0,intMawasu);
String strirekae2 = strmoji.substring(intMawasu,strmoji.length());
//分けた文字列を逆にして、strmojiに入れなおす。
strmoji= strirekae2+strirekae1;
}
//結果表示
System.out.println(strmoji);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
41,
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,
0,
13,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
4,
18,
13,
13,
4,
18,
13,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
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
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
50,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
14,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
14,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
70,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
80,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}\n\t}\n\n}",
"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\t\twhile (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}",
"true",
"{\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"if (str.equals(\"-\"))\n\t\t\t\tbreak;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"int[] x = new int[m];",
"x",
"new int[m]",
"m",
"for (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}",
"{\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}",
"x[i] = sc.nextInt()",
"x[i]",
"x",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sum += x[i]",
"sum",
"x[i]",
"x",
"i",
"int a = sum % str.length();",
"a",
"sum % str.length()",
"sum",
"str.length()",
"str.length",
"str",
"System.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a))",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%s%s\\n\"",
"str.substring(a)",
"str.substring",
"str",
"a",
"str.substring(0, a)",
"str.substring",
"str",
"0",
"a",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString str = sc.next();\n\t\t\tif (str.equals(\"-\"))\n\t\t\t\tbreak;\n\t\t\tint m = sc.nextInt();\n\t\t\tint sum = 0;\n\t\t\tint[] x = new int[m];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tx[i] = sc.nextInt();\n\t\t\t\tsum += x[i];\n\t\t\t}\n\t\t\tint a = sum % str.length();\n\t\t\tSystem.out.printf(\"%s%s\\n\", str.substring(a), str.substring(0, a));\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String str = sc.next();
if (str.equals("-"))
break;
int m = sc.nextInt();
int sum = 0;
int[] x = new int[m];
for (int i = 0; i < m; i++) {
x[i] = sc.nextInt();
sum += x[i];
}
int a = sum % str.length();
System.out.printf("%s%s\n", str.substring(a), str.substring(0, a));
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
17,
13,
30,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
2,
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
],
[
101,
11
],
[
101,
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
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
23,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
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
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
59,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
59,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
59,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
23,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
12,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws IOException{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tBufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString strLine = null;\n\t\twhile(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}\n\n\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tBufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString strLine = null;\n\t\twhile(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}\n\n\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tBufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString strLine = null;\n\t\twhile(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}\n\n\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tBufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString strLine = null;\n\t\twhile(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}\n\n\n\t}",
"BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));",
"insBR",
"new BufferedReader(new InputStreamReader(System.in))",
"String strLine = null;",
"strLine",
"null",
"while(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}",
"true",
"{\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}",
"strLine = insBR.readLine()",
"strLine",
"insBR.readLine()",
"insBR.readLine",
"insBR",
"if(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}",
"\"-\".equals(strLine)",
"\"-\".equals",
"\"-\"",
"strLine",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"String strNum =insBR.readLine();",
"strNum",
"insBR.readLine()",
"insBR.readLine",
"insBR",
"int m = Integer.parseInt(strNum);",
"m",
"Integer.parseInt(strNum)",
"Integer.parseInt",
"Integer",
"strNum",
"for(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}",
"{\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}",
"String strH = insBR.readLine();",
"strH",
"insBR.readLine()",
"insBR.readLine",
"insBR",
"int h = Integer.parseInt(strH);",
"h",
"Integer.parseInt(strH)",
"Integer.parseInt",
"Integer",
"strH",
"String strCutLine = strLine.substring(0,h);",
"strCutLine",
"strLine.substring(0,h)",
"strLine.substring",
"strLine",
"0",
"h",
"String strTemp = strLine.substring(h,strLine.length());",
"strTemp",
"strLine.substring(h,strLine.length())",
"strLine.substring",
"strLine",
"h",
"strLine.length()",
"strLine.length",
"strLine",
"strLine = strTemp + strCutLine",
"strLine",
"strTemp + strCutLine",
"strTemp",
"strCutLine",
"System.out.println(strLine)",
"System.out.println",
"System.out",
"System",
"System.out",
"strLine",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tBufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString strLine = null;\n\t\twhile(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}\n\n\n\t}\n}",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tBufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString strLine = null;\n\t\twhile(true){\n\t\t\t//??????????????????\n\t\t\tstrLine = insBR.readLine();\n\t\t\t//?????¬???????????¶\n\t\t\tif(\"-\".equals(strLine)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//?????£??????????????°??????\n\t\t\tString strNum =insBR.readLine();\n\t\t\tint m = Integer.parseInt(strNum);\n\n\t\t\tfor(int i = 0; i < m; i++){\n\t\t\t\t//????????????????????°?????????\n\t\t\t\tString strH = insBR.readLine();\n\t\t\t\tint h = Integer.parseInt(strH);\n\n\t\t\t\t//?????????????????????\n\t\t\t\tString strCutLine = strLine.substring(0,h);\n\t\t\t\tString strTemp = strLine.substring(h,strLine.length());\n\t\t\t\t//??£???\n\t\t\t\tstrLine = strTemp + strCutLine;\n\t\t\t}\n\t\t\tSystem.out.println(strLine);\n\n\t\t}\n\n\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException{
// TODO ?????????????????????????????????????????????
BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
String strLine = null;
while(true){
//??????????????????
strLine = insBR.readLine();
//?????¬???????????¶
if("-".equals(strLine)){
break;
}
//?????£??????????????°??????
String strNum =insBR.readLine();
int m = Integer.parseInt(strNum);
for(int i = 0; i < m; i++){
//????????????????????°?????????
String strH = insBR.readLine();
int h = Integer.parseInt(strH);
//?????????????????????
String strCutLine = strLine.substring(0,h);
String strTemp = strLine.substring(h,strLine.length());
//??£???
strLine = strTemp + strCutLine;
}
System.out.println(strLine);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
42,
17,
30,
0,
13,
20,
14,
4,
18,
4,
18,
13,
17,
30,
3,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
42,
2,
40,
13,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
26,
31
],
[
25,
32
],
[
32,
33
],
[
21,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
21,
42
],
[
42,
43
],
[
42,
44
],
[
21,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
50,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
50,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
50,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
50,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
21,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
]
| [
"import java.io.*;\n \npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint m; //???????????£??????????????????\n\t\tStringBuffer cards;; \n\t\tString shuCards = \"\";\n\n\t\twhile(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}\n }\n \n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint m; //???????????£??????????????????\n\t\tStringBuffer cards;; \n\t\tString shuCards = \"\";\n\n\t\twhile(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}\n }\n \n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint m; //???????????£??????????????????\n\t\tStringBuffer cards;; \n\t\tString shuCards = \"\";\n\n\t\twhile(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint m; //???????????£??????????????????\n\t\tStringBuffer cards;; \n\t\tString shuCards = \"\";\n\n\t\twhile(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int m;",
"m",
"StringBuffer cards;",
"cards",
"String shuCards = \"\";",
"shuCards",
"\"\"",
"while(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}",
"true",
"{\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}",
"cards = new StringBuffer(br.readLine())",
"cards",
"new StringBuffer(br.readLine())",
"if(cards.toString().equals(\"-\")){break;}",
"cards.toString().equals(\"-\")",
"cards.toString().equals",
"cards.toString()",
"cards.toString",
"cards",
"\"-\"",
"{break;}",
"break;",
"m = Integer.parseInt(br.readLine())",
"m",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int cnt = 0;",
"cnt",
"0",
"while(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}",
"cnt++ != m",
"cnt++",
"cnt",
"m",
"{\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}",
"int h = Integer.parseInt(br.readLine());",
"h",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"shuCards = cards.substring(h, cards.length())",
"shuCards",
"cards.substring(h, cards.length())",
"cards.substring",
"cards",
"h",
"cards.length()",
"cards.length",
"cards",
"shuCards += cards.substring(0, h)",
"shuCards",
"cards.substring(0, h)",
"cards.substring",
"cards",
"0",
"h",
"cards.delete(0, cards.length())",
"cards.delete",
"cards",
"0",
"cards.length()",
"cards.length",
"cards",
"cards.append(shuCards)",
"cards.append",
"cards",
"shuCards",
"System.out.println(shuCards)",
"System.out.println",
"System.out",
"System",
"System.out",
"shuCards",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint m; //???????????£??????????????????\n\t\tStringBuffer cards;; \n\t\tString shuCards = \"\";\n\n\t\twhile(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}\n }\n \n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint m; //???????????£??????????????????\n\t\tStringBuffer cards;; \n\t\tString shuCards = \"\";\n\n\t\twhile(true){\n\t cards = new StringBuffer(br.readLine());\n\t\t\tif(cards.toString().equals(\"-\")){break;}\n\t\t\tm = Integer.parseInt(br.readLine());\n\t\t\tint cnt = 0; //???????????£??????????????????\n\t\t\twhile(cnt++ != m){\n\t\t\t\tint h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????\n\t\t\t\tshuCards = cards.substring(h, cards.length());\n\t\t\t\tshuCards += cards.substring(0, h);\n\t\t\t\tcards.delete(0, cards.length());\n\t\t\t\tcards.append(shuCards);\n\t\t\t}\n\t\t\tSystem.out.println(shuCards);\n\t\t}\n }\n \n}",
"Main"
]
| import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int m; //???????????£??????????????????
StringBuffer cards;;
String shuCards = "";
while(true){
cards = new StringBuffer(br.readLine());
if(cards.toString().equals("-")){break;}
m = Integer.parseInt(br.readLine());
int cnt = 0; //???????????£??????????????????
while(cnt++ != m){
int h = Integer.parseInt(br.readLine()); //?????????h???????????????????????????????????£???????????????
shuCards = cards.substring(h, cards.length());
shuCards += cards.substring(0, h);
cards.delete(0, cards.length());
cards.append(shuCards);
}
System.out.println(shuCards);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
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
],
[
104,
11
],
[
104,
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
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
23,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
56,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
56,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
56,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
56,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
23,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
12,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tString strCom = \" \";\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader (System.in));\n\t\twhile(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tString strCom = \" \";\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader (System.in));\n\t\twhile(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tString strCom = \" \";\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader (System.in));\n\t\twhile(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}\n\t}",
"main",
"{\n\t\tString strCom = \" \";\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader (System.in));\n\t\twhile(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}\n\t}",
"String strCom = \" \";",
"strCom",
"\" \"",
"BufferedReader br = new BufferedReader (new InputStreamReader (System.in));",
"br",
"new BufferedReader (new InputStreamReader (System.in))",
"while(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}",
"true",
"{\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}",
"String charaStr = br.readLine();",
"charaStr",
"br.readLine()",
"br.readLine",
"br",
"if (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}",
"charaStr.equals(\"-\")",
"charaStr.equals",
"charaStr",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int shuffleNum =Integer.parseInt(br.readLine());",
"shuffleNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < shuffleNum",
"i",
"shuffleNum",
"i++",
"i++",
"i",
"{\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}",
"{\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}",
"int moveLength = Integer.parseInt(br.readLine());",
"moveLength",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}",
"i == 0",
"i",
"0",
"{\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}",
"strCom = charaStr",
"strCom",
"charaStr",
"String str1 = strCom.substring(0, moveLength);",
"str1",
"strCom.substring(0, moveLength)",
"strCom.substring",
"strCom",
"0",
"moveLength",
"String str2 = strCom.substring(moveLength, strCom.length());",
"str2",
"strCom.substring(moveLength, strCom.length())",
"strCom.substring",
"strCom",
"moveLength",
"strCom.length()",
"strCom.length",
"strCom",
"strCom = str2.concat(str1)",
"strCom",
"str2.concat(str1)",
"str2.concat",
"str2",
"str1",
"System.out.println(strCom)",
"System.out.println",
"System.out",
"System",
"System.out",
"strCom",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tString strCom = \" \";\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader (System.in));\n\t\twhile(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tString strCom = \" \";\n\t\tBufferedReader br = new BufferedReader (new InputStreamReader (System.in));\n\t\twhile(true){\n\t\t\tString charaStr = br.readLine();\n\t\t\tif (charaStr.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint shuffleNum =Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 0;i < shuffleNum;i++){\n\n\t\t\t\tint moveLength = Integer.parseInt(br.readLine());\n\t\t\t\t\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tstrCom = charaStr;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString str1 = strCom.substring(0, moveLength);\n\t\t\t\tString str2 = strCom.substring(moveLength, strCom.length());\n\n\t\t\t\tstrCom = str2.concat(str1);\n\t\t\t}\n\t\t\tSystem.out.println(strCom);\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
String strCom = " ";
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
while(true){
String charaStr = br.readLine();
if (charaStr.equals("-")){
break;
}
int shuffleNum =Integer.parseInt(br.readLine());
for (int i = 0;i < shuffleNum;i++){
int moveLength = Integer.parseInt(br.readLine());
if (i == 0) {
strCom = charaStr;
}
String str1 = strCom.substring(0, moveLength);
String str2 = strCom.substring(moveLength, strCom.length());
strCom = str2.concat(str1);
}
System.out.println(strCom);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
20,
41,
13,
4,
13,
14,
4,
18,
13,
17,
30,
3,
30,
4,
18,
13,
13,
41,
13,
4,
18,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
4,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
30,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
133,
8
],
[
133,
9
],
[
9,
10
],
[
9,
11
],
[
133,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
28,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
20,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
20,
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
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
59,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
20,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
14,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
86,
96
],
[
96,
97
],
[
97,
98
],
[
86,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
14,
110
],
[
110,
111
],
[
12,
112
],
[
112,
113
],
[
133,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
133,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
]
| [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\twhile (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}\n\n\t\tfor (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\twhile (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}\n\n\t\tfor (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"Main",
"public static Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\twhile (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}\n\n\t\tfor (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}\n\n\t\tclose();\n\n\t}",
"main",
"{\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\twhile (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}\n\n\t\tfor (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}\n\n\t\tclose();\n\n\t}",
"ArrayList<String> list = new ArrayList<String>();",
"list",
"new ArrayList<String>()",
"while (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}",
"true",
"{\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"String input = input();",
"input",
"input()",
"input",
"if (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}",
"input.equals(\"-\")",
"input.equals",
"input",
"\"-\"",
"{\n\n\t\t\t\tbreak;\n\n\t\t\t}",
"break;",
"{\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}",
"sb.append(input)",
"sb.append",
"sb",
"input",
"int n = Integer.parseInt(input());",
"n",
"Integer.parseInt(input())",
"Integer.parseInt",
"Integer",
"input()",
"input",
"for (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}",
"{\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}",
"int h = Integer.parseInt(input());",
"h",
"Integer.parseInt(input())",
"Integer.parseInt",
"Integer",
"input()",
"input",
"sb.append(sb.substring(0, h))",
"sb.append",
"sb",
"sb.substring(0, h)",
"sb.substring",
"sb",
"0",
"h",
"sb.delete(0, h)",
"sb.delete",
"sb",
"0",
"h",
"list.add(sb.toString())",
"list.add",
"list",
"sb.toString()",
"sb.toString",
"sb",
"for (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < list.size()",
"j",
"list.size()",
"list.size",
"list",
"j++",
"j++",
"j",
"{\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}",
"{\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}",
"System.out.println(list.get(j))",
"System.out.println",
"System.out",
"System",
"System.out",
"list.get(j)",
"list.get",
"list",
"j",
"close()",
"close",
"String[] args",
"args",
"public static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}",
"input",
"{\n\n\t\treturn scanner.nextLine();\n\n\t}",
"return scanner.nextLine();",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"public static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}",
"close",
"{\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}",
"if (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}",
"scanner != null",
"scanner",
"null",
"{\n\n\t\t\tscanner.close();\n\n\t\t}",
"scanner.close()",
"scanner.close",
"scanner",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\twhile (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}\n\n\t\tfor (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\twhile (true) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString input = input();\n\n\t\t\tif (input.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\n\t\t\t\tsb.append(input);\n\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(input());\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\t\tint h = Integer.parseInt(input());\n\n\t\t\t\tsb.append(sb.substring(0, h));\n\t\t\t\tsb.delete(0, h);\n\n\t\t\t}\n\n\t\t\tlist.add(sb.toString());\n\n\t\t}\n\n\t\tfor (int j = 0; j < list.size(); j++) {\n\n\t\t\tSystem.out.println(list.get(j));\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
ArrayList<String> list = new ArrayList<String>();
while (true) {
StringBuilder sb = new StringBuilder();
String input = input();
if (input.equals("-")) {
break;
} else {
sb.append(input);
}
int n = Integer.parseInt(input());
for (int i = 0; i < n; i++) {
int h = Integer.parseInt(input());
sb.append(sb.substring(0, h));
sb.delete(0, h);
}
list.add(sb.toString());
}
for (int j = 0; j < list.size(); j++) {
System.out.println(list.get(j));
}
close();
}
public static String input() {
return scanner.nextLine();
}
public static void close() {
if (scanner != null) {
scanner.close();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
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
],
[
100,
11
],
[
100,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
31,
32
],
[
20,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
20,
44
],
[
44,
45
],
[
44,
46
],
[
20,
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
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
59,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
59,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
59,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
20,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
95,
96
],
[
12,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ?????£?????????????????????????????????????????????\n\t\t//String shuffle_strings = \"\";\n\n\t\twhile (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}\n\n\t}//StringBuilder ?????° = new StringBuilder(????????????????????°);\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ?????£?????????????????????????????????????????????\n\t\t//String shuffle_strings = \"\";\n\n\t\twhile (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}\n\n\t}//StringBuilder ?????° = new StringBuilder(????????????????????°);\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ?????£?????????????????????????????????????????????\n\t\t//String shuffle_strings = \"\";\n\n\t\twhile (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}\n\n\t}//StringBuilder ?????° = new StringBuilder(????????????????????°);",
"main",
"{\n\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ?????£?????????????????????????????????????????????\n\t\t//String shuffle_strings = \"\";\n\n\t\twhile (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}\n\n\t}",
"BufferedReader input = new BufferedReader(new InputStreamReader(System.in));",
"input",
"new BufferedReader(new InputStreamReader(System.in))",
"while (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}",
"true",
"{\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}",
"String alphabet_cards = input.readLine();",
"alphabet_cards",
"input.readLine()",
"input.readLine",
"input",
"if (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}",
"alphabet_cards.equals(\"-\")",
"alphabet_cards.equals",
"alphabet_cards",
"\"-\"",
"{\n\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"String shuffle_num = input.readLine();",
"shuffle_num",
"input.readLine()",
"input.readLine",
"input",
"int shuffle_times = Integer.parseInt(shuffle_num);",
"shuffle_times",
"Integer.parseInt(shuffle_num)",
"Integer.parseInt",
"Integer",
"shuffle_num",
"StringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);",
"shuffle_before_cards",
"new StringBuilder(alphabet_cards)",
"for (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}",
"int cards_spot = 0;",
"int cards_spot = 0;",
"cards_spot",
"0",
"cards_spot < shuffle_times",
"cards_spot",
"shuffle_times",
"cards_spot++",
"cards_spot++",
"cards_spot",
"{\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}",
"{\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}",
"String shuffle_spot = input.readLine();",
"shuffle_spot",
"input.readLine()",
"input.readLine",
"input",
"int shuffle_cards = Integer.parseInt(shuffle_spot);",
"shuffle_cards",
"Integer.parseInt(shuffle_spot)",
"Integer.parseInt",
"Integer",
"shuffle_spot",
"String extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);",
"extracted_cards",
"shuffle_before_cards.substring(0, shuffle_cards)",
"shuffle_before_cards.substring",
"shuffle_before_cards",
"0",
"shuffle_cards",
"shuffle_before_cards.delete(0, shuffle_cards)",
"shuffle_before_cards.delete",
"shuffle_before_cards",
"0",
"shuffle_cards",
"shuffle_before_cards = shuffle_before_cards.append(extracted_cards)",
"shuffle_before_cards",
"shuffle_before_cards.append(extracted_cards)",
"shuffle_before_cards.append",
"shuffle_before_cards",
"extracted_cards",
"System.out.println(shuffle_before_cards.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"shuffle_before_cards.toString()",
"shuffle_before_cards.toString",
"shuffle_before_cards",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ?????£?????????????????????????????????????????????\n\t\t//String shuffle_strings = \"\";\n\n\t\twhile (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}\n\n\t}//StringBuilder ?????° = new StringBuilder(????????????????????°);\n}",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ?????£?????????????????????????????????????????????\n\t\t//String shuffle_strings = \"\";\n\n\t\twhile (true) {\n\n\t\t\t// ??????????????°??¢??????????????????????????\\???\n\t\t\tString alphabet_cards = input.readLine();\n\n\t\t\t//-?????\\?????§??????\n\t\t\tif (alphabet_cards.equals(\"-\")) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString shuffle_num = input.readLine();\n\n\t\t\t// ?????£?????????????????°\n\t\t\tint shuffle_times = Integer.parseInt(shuffle_num);\n\n\t\t\tStringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);\n\n\t\t\t// ?????£?????????????????°????????????????????£?????????\n\t\t\tfor (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {\n\n\t\t\t\t//??????????????§????????£??????????????????\n\t\t\t\tString shuffle_spot = input.readLine();\n\n\t\t\t\tint shuffle_cards = Integer.parseInt(shuffle_spot);\n\n\t\t\t\t// ??\\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????\n\t\t\t\tString extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);\n\n\t\t\t\t//???????????\\???????????????????????\\????????????alphabet_cards??????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards.delete(0, shuffle_cards);\n\n\t\t\t\t//???????????\\??????????????????,????°????extracted_cards????¶????\n\t\t\t\tshuffle_before_cards = shuffle_before_cards.append(extracted_cards);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(shuffle_before_cards.toString());\n\n\t\t}\n\n\t}//StringBuilder ?????° = new StringBuilder(????????????????????°);\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
// ?????£?????????????????????????????????????????????
//String shuffle_strings = "";
while (true) {
// ??????????????°??¢??????????????????????????\???
String alphabet_cards = input.readLine();
//-?????\?????§??????
if (alphabet_cards.equals("-")) {
break;
}
String shuffle_num = input.readLine();
// ?????£?????????????????°
int shuffle_times = Integer.parseInt(shuffle_num);
StringBuilder shuffle_before_cards = new StringBuilder(alphabet_cards);
// ?????£?????????????????°????????????????????£?????????
for (int cards_spot = 0; cards_spot < shuffle_times; cards_spot++) {
//??????????????§????????£??????????????????
String shuffle_spot = input.readLine();
int shuffle_cards = Integer.parseInt(shuffle_spot);
// ??\??????????????¢???????????????????????????????????????shuffle_cards???????????§?????????
String extracted_cards = shuffle_before_cards.substring(0, shuffle_cards);
//???????????\???????????????????????\????????????alphabet_cards??????extracted_cards????¶????
shuffle_before_cards.delete(0, shuffle_cards);
//???????????\??????????????????,????°????extracted_cards????¶????
shuffle_before_cards = shuffle_before_cards.append(extracted_cards);
}
System.out.println(shuffle_before_cards.toString());
}
}//StringBuilder ?????° = new StringBuilder(????????????????????°);
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
0,
13,
17,
41,
13,
42,
17,
30,
4,
18,
13,
4,
18,
13,
14,
4,
18,
20,
17,
30,
3,
0,
13,
4,
18,
13,
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,
13,
4,
18,
13,
17,
4,
18,
13,
17,
17,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
20,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
2,
4,
18,
13,
17,
4,
18,
18,
13,
13,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
132,
8
],
[
132,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
35,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
47,
48
],
[
35,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
35,
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
],
[
66,
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
],
[
84,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
84,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
35,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
35,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
35,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
11,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
118,
122
],
[
11,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
9,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
]
| [
"\n\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\tString str = \"\";\n\t\tint num, number;\n\t\tnum = 0;// ?????°\n\t\tchar c;\n\n\t\t// ??????????????\\???????????????????????????\n\t\t// List<String> list = new ArrayList<String>();\n\n\t\t// ???????????????????????§??????\n\t\twhile (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}\n\t\tsb2.deleteCharAt(sb2.length() - 1);\n\t\tSystem.out.println(new String(sb2));\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\tString str = \"\";\n\t\tint num, number;\n\t\tnum = 0;// ?????°\n\t\tchar c;\n\n\t\t// ??????????????\\???????????????????????????\n\t\t// List<String> list = new ArrayList<String>();\n\n\t\t// ???????????????????????§??????\n\t\twhile (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}\n\t\tsb2.deleteCharAt(sb2.length() - 1);\n\t\tSystem.out.println(new String(sb2));\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\tString str = \"\";\n\t\tint num, number;\n\t\tnum = 0;// ?????°\n\t\tchar c;\n\n\t\t// ??????????????\\???????????????????????????\n\t\t// List<String> list = new ArrayList<String>();\n\n\t\t// ???????????????????????§??????\n\t\twhile (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}\n\t\tsb2.deleteCharAt(sb2.length() - 1);\n\t\tSystem.out.println(new String(sb2));\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\tString str = \"\";\n\t\tint num, number;\n\t\tnum = 0;// ?????°\n\t\tchar c;\n\n\t\t// ??????????????\\???????????????????????????\n\t\t// List<String> list = new ArrayList<String>();\n\n\t\t// ???????????????????????§??????\n\t\twhile (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}\n\t\tsb2.deleteCharAt(sb2.length() - 1);\n\t\tSystem.out.println(new String(sb2));\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"StringBuilder sb2 = new StringBuilder();",
"sb2",
"new StringBuilder()",
"String str = \"\";",
"str",
"\"\"",
"int num",
"num",
"number;",
"number",
"num = 0",
"num",
"0",
"char c;",
"c",
"while (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}",
"true",
"{\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}",
"sb.append(scan.next())",
"sb.append",
"sb",
"scan.next()",
"scan.next",
"scan",
"if (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}",
"new String(sb).equals(\"-\")",
"new String(sb).equals",
"new String(sb)",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"num = scan.nextInt()",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}",
"int count2 = 0;",
"int count2 = 0;",
"count2",
"0",
"count2 < num",
"count2",
"num",
"count2++",
"count2++",
"count2",
"{\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}",
"{\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}",
"number = scan.nextInt()",
"number",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}",
"int count3 = 0;",
"int count3 = 0;",
"count3",
"0",
"count3 < number",
"count3",
"number",
"count3++",
"count3++",
"count3",
"{\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}",
"{\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}",
"c = sb.charAt(0)",
"c",
"sb.charAt(0)",
"sb.charAt",
"sb",
"0",
"sb.delete(0, 1)",
"sb.delete",
"sb",
"0",
"1",
"sb.append(String.valueOf(c))",
"sb.append",
"sb",
"String.valueOf(c)",
"String.valueOf",
"String",
"c",
"sb2.append(new String(sb))",
"sb2.append",
"sb2",
"new String(sb)",
"sb2.append(\"\\n\")",
"sb2.append",
"sb2",
"\"\\n\"",
"sb.setLength(0)",
"sb.setLength",
"sb",
"0",
"sb2.deleteCharAt(sb2.length() - 1)",
"sb2.deleteCharAt",
"sb2",
"sb2.length() - 1",
"sb2.length()",
"sb2.length",
"sb2",
"1",
"System.out.println(new String(sb2))",
"System.out.println",
"System.out",
"System",
"System.out",
"new String(sb2)",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\tString str = \"\";\n\t\tint num, number;\n\t\tnum = 0;// ?????°\n\t\tchar c;\n\n\t\t// ??????????????\\???????????????????????????\n\t\t// List<String> list = new ArrayList<String>();\n\n\t\t// ???????????????????????§??????\n\t\twhile (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}\n\t\tsb2.deleteCharAt(sb2.length() - 1);\n\t\tSystem.out.println(new String(sb2));\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder sb2 = new StringBuilder();\n\t\tString str = \"\";\n\t\tint num, number;\n\t\tnum = 0;// ?????°\n\t\tchar c;\n\n\t\t// ??????????????\\???????????????????????????\n\t\t// List<String> list = new ArrayList<String>();\n\n\t\t// ???????????????????????§??????\n\t\twhile (true) {\n\t\t\t// StringBuilder?????\\??????\n\t\t\tsb.append(scan.next());\n\t\t\t// System.out.println(\"??????????§?\");\n\t\t\tif (new String(sb).equals(\"-\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ?????°???input\n\t\t\tnum = scan.nextInt();\n\t\t\t// ?????°??????????????????\n\t\t\tfor (int count2 = 0; count2 < num; count2++) {\n\t\t\t\t// ?????£??????????????°\n\t\t\t\tnumber = scan.nextInt();\n\t\t\t\t// ?????£??????????????? c = sb.charAt(0);\n\n\t\t\t\tfor (int count3 = 0; count3 < number; count3++) {\n\t\t\t\t\t// ?????£??????????????°???????????????????????????????°?????????£?????????\n\t\t\t\t\t// sb?????????????¶???????????????????????????£?????????\n\t\t\t\t\t// ??????????????????c?????£??\\\n\t\t\t\t\tc = sb.charAt(0);\n\t\t\t\t\t// ????????????????????????\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\t// c??????????°??????????\n\t\t\t\t\tsb.append(String.valueOf(c));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsb2.append(new String(sb));\n\t\t\tsb2.append(\"\\n\");\n\t\t\t// sb?????????\n\t\t\tsb.setLength(0);\n\n\t\t}\n\t\tsb2.deleteCharAt(sb2.length() - 1);\n\t\tSystem.out.println(new String(sb2));\n\t}\n}",
"Main"
]
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String args[]) throws IOException {
Scanner scan = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
StringBuilder sb2 = new StringBuilder();
String str = "";
int num, number;
num = 0;// ?????°
char c;
// ??????????????\???????????????????????????
// List<String> list = new ArrayList<String>();
// ???????????????????????§??????
while (true) {
// StringBuilder?????\??????
sb.append(scan.next());
// System.out.println("??????????§?");
if (new String(sb).equals("-")) {
break;
}
// ?????°???input
num = scan.nextInt();
// ?????°??????????????????
for (int count2 = 0; count2 < num; count2++) {
// ?????£??????????????°
number = scan.nextInt();
// ?????£??????????????? c = sb.charAt(0);
for (int count3 = 0; count3 < number; count3++) {
// ?????£??????????????°???????????????????????????????°?????????£?????????
// sb?????????????¶???????????????????????????£?????????
// ??????????????????c?????£??\
c = sb.charAt(0);
// ????????????????????????
sb.delete(0, 1);
// c??????????°??????????
sb.append(String.valueOf(c));
}
}
sb2.append(new String(sb));
sb2.append("\n");
// sb?????????
sb.setLength(0);
}
sb2.deleteCharAt(sb2.length() - 1);
System.out.println(new String(sb2));
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
89,
8
],
[
89,
9
],
[
9,
10
],
[
9,
11
],
[
89,
12
],
[
12,
13
],
[
12,
14
],
[
89,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
20,
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
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
52,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
74,
78
],
[
20,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
17,
83
],
[
83,
84
],
[
84,
85
],
[
15,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.io.PrintWriter;\nimport java.util.Scanner;\npublic class Main {\n\tstatic Scanner sc=new Scanner(System.in);\n\tstatic PrintWriter pr=new PrintWriter(System.out);\n\tpublic static void main(String[] args) {\n\t\twhile(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}\n\t\tpr.flush();\n\t}\n}",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic Scanner sc=new Scanner(System.in);\n\tstatic PrintWriter pr=new PrintWriter(System.out);\n\tpublic static void main(String[] args) {\n\t\twhile(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}\n\t\tpr.flush();\n\t}\n}",
"Main",
"static Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static PrintWriter pr=new PrintWriter(System.out);",
"pr",
"new PrintWriter(System.out)",
"public static void main(String[] args) {\n\t\twhile(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}\n\t\tpr.flush();\n\t}",
"main",
"{\n\t\twhile(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}\n\t\tpr.flush();\n\t}",
"while(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}",
"true",
"{ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}",
"String temp= sc.nextLine();",
"temp",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(temp.equals(\"-\"))break;",
"temp.equals(\"-\")",
"temp.equals",
"temp",
"\"-\"",
"break;",
"int m=Integer.parseInt(sc.nextLine());",
"m",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}",
"{\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}",
"String str=sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int h=Integer.parseInt(str);",
"h",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"temp=temp.substring(h,temp.length())+temp.substring(0,h)",
"temp",
"temp.substring(h,temp.length())+temp.substring(0,h)",
"temp.substring(h,temp.length())",
"temp.substring",
"temp",
"h",
"temp.length()",
"temp.length",
"temp",
"temp.substring(0,h)",
"temp.substring",
"temp",
"0",
"h",
"pr.println(temp)",
"pr.println",
"pr",
"temp",
"pr.flush()",
"pr.flush",
"pr",
"String[] args",
"args",
"public class Main {\n\tstatic Scanner sc=new Scanner(System.in);\n\tstatic PrintWriter pr=new PrintWriter(System.out);\n\tpublic static void main(String[] args) {\n\t\twhile(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}\n\t\tpr.flush();\n\t}\n}",
"public class Main {\n\tstatic Scanner sc=new Scanner(System.in);\n\tstatic PrintWriter pr=new PrintWriter(System.out);\n\tpublic static void main(String[] args) {\n\t\twhile(true){ \n\t\t\tString temp= sc.nextLine();\n\t\t\tif(temp.equals(\"-\"))break;\n\t\t\tint m=Integer.parseInt(sc.nextLine());\n\t\t\tfor(int i=0;i<m;i++){\n\t\t\t\tString str=sc.nextLine();\n\t\t\t\tint h=Integer.parseInt(str);\n\t\t\t\ttemp=temp.substring(h,temp.length())+temp.substring(0,h);\n\t\t\t}\n\t\t\tpr.println(temp);\n\t\t}\n\t\tpr.flush();\n\t}\n}",
"Main"
]
| import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static Scanner sc=new Scanner(System.in);
static PrintWriter pr=new PrintWriter(System.out);
public static void main(String[] args) {
while(true){
String temp= sc.nextLine();
if(temp.equals("-"))break;
int m=Integer.parseInt(sc.nextLine());
for(int i=0;i<m;i++){
String str=sc.nextLine();
int h=Integer.parseInt(str);
temp=temp.substring(h,temp.length())+temp.substring(0,h);
}
pr.println(temp);
}
pr.flush();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
40,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
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
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
23,
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
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
47,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
58,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
23,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
23,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
6,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args)throws Exception {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }\n sc.close();\n\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args)throws Exception {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }\n sc.close();\n\n }\n\n}",
"Main",
"public static void main(String[] args)throws Exception {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }\n sc.close();\n\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }\n sc.close();\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String line = sc.nextLine();",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }",
"!(line.equals(\"-\"))",
"(line.equals(\"-\"))",
"line.equals",
"line",
"\"-\"",
"{\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }",
"String num = sc.nextLine();",
"num",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(num);",
"n",
"Integer.parseInt(num)",
"Integer.parseInt",
"Integer",
"num",
"for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }",
"{\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }",
"int count = Integer.parseInt(sc.nextLine());",
"count",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"line = line.substring(count) + line.substring(0, count)",
"line",
"line.substring(count) + line.substring(0, count)",
"line.substring(count)",
"line.substring",
"line",
"count",
"line.substring(0, count)",
"line.substring",
"line",
"0",
"count",
"System.out.println(line)",
"System.out.println",
"System.out",
"System",
"System.out",
"line",
"line = sc.nextLine()",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args)throws Exception {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }\n sc.close();\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args)throws Exception {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n while (!(line.equals(\"-\"))) {\n \n String num = sc.nextLine();\n int n = Integer.parseInt(num);\n\n for (int i = 0; i < n; i++) {\n int count = Integer.parseInt(sc.nextLine());\n\n line = line.substring(count) + line.substring(0, count);\n }\n System.out.println(line);\n line = sc.nextLine();\n }\n sc.close();\n\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args)throws Exception {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
while (!(line.equals("-"))) {
String num = sc.nextLine();
int n = Integer.parseInt(num);
for (int i = 0; i < n; i++) {
int count = Integer.parseInt(sc.nextLine());
line = line.substring(count) + line.substring(0, count);
}
System.out.println(line);
line = sc.nextLine();
}
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
42,
40,
4,
18,
13,
17,
30,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
17,
18,
13,
13,
0,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
0,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
121,
5
],
[
121,
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
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
21,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
32,
33
],
[
27,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
34,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
27,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
70,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
70,
91
],
[
91,
92
],
[
91,
93
],
[
70,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
70,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
70,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
27,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
27,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
6,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str1 = scan.next();\n\t\tString str2;\n\t\tString str3;\n\t\t\n\t\twhile(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str1 = scan.next();\n\t\tString str2;\n\t\tString str3;\n\t\t\n\t\twhile(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str1 = scan.next();\n\t\tString str2;\n\t\tString str3;\n\t\t\n\t\twhile(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str1 = scan.next();\n\t\tString str2;\n\t\tString str3;\n\t\t\n\t\twhile(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String str1 = scan.next();",
"str1",
"scan.next()",
"scan.next",
"scan",
"String str2;",
"str2",
"String str3;",
"str3",
"while(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}",
"!str1.equals(\"-\")",
"str1.equals(\"-\")",
"str1.equals",
"str1",
"\"-\"",
"{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}",
"int[] shuffle = new int[scan.nextInt()];",
"shuffle",
"new int[scan.nextInt()]",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < shuffle.length",
"i",
"shuffle.length",
"shuffle",
"shuffle.length",
"i++",
"i++",
"i",
"{shuffle[i] = scan.nextInt();}",
"{shuffle[i] = scan.nextInt();}",
"shuffle[i] = scan.nextInt()",
"shuffle[i]",
"shuffle",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < shuffle.length",
"i",
"shuffle.length",
"shuffle",
"shuffle.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}",
"{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}",
"str2 = str1.substring(0,shuffle[i])",
"str2",
"str1.substring(0,shuffle[i])",
"str1.substring",
"str1",
"0",
"shuffle[i]",
"shuffle",
"i",
"str3 = str1.substring(shuffle[i], str1.length())",
"str3",
"str1.substring(shuffle[i], str1.length())",
"str1.substring",
"str1",
"shuffle[i]",
"shuffle",
"i",
"str1.length()",
"str1.length",
"str1",
"StringBuilder buf = new StringBuilder();",
"buf",
"new StringBuilder()",
"buf.append(str3)",
"buf.append",
"buf",
"str3",
"buf.append(str2)",
"buf.append",
"buf",
"str2",
"str1 = buf.toString()",
"str1",
"buf.toString()",
"buf.toString",
"buf",
"System.out.println(str1)",
"System.out.println",
"System.out",
"System",
"System.out",
"str1",
"str1 = scan.next()",
"str1",
"scan.next()",
"scan.next",
"scan",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str1 = scan.next();\n\t\tString str2;\n\t\tString str3;\n\t\t\n\t\twhile(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str1 = scan.next();\n\t\tString str2;\n\t\tString str3;\n\t\t\n\t\twhile(!str1.equals(\"-\"))\n\t\t{\n\t\t\tint[] shuffle = new int[scan.nextInt()];\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}\n\t\t\t\n\t\t\tfor(int i = 0;i < shuffle.length;i++)\n\t\t\t{\n\t\t\t\tstr2 = str1.substring(0,shuffle[i]);\n\t\t\t\tstr3 = str1.substring(shuffle[i], str1.length());\n\t\t\t\t\n\t\t\t\tStringBuilder buf = new StringBuilder();\n\t\t\t\tbuf.append(str3);\n\t\t\t\tbuf.append(str2);\n\t\t\t\tstr1 = buf.toString();\n\t\t\t}\n\t\t\tSystem.out.println(str1);\n\t\t\tstr1 = scan.next();\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String str1 = scan.next();
String str2;
String str3;
while(!str1.equals("-"))
{
int[] shuffle = new int[scan.nextInt()];
for(int i = 0;i < shuffle.length;i++){shuffle[i] = scan.nextInt();}
for(int i = 0;i < shuffle.length;i++)
{
str2 = str1.substring(0,shuffle[i]);
str3 = str1.substring(shuffle[i], str1.length());
StringBuilder buf = new StringBuilder();
buf.append(str3);
buf.append(str2);
str1 = buf.toString();
}
System.out.println(str1);
str1 = scan.next();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
17,
30,
41,
13,
4,
18,
13,
41,
13,
20,
14,
4,
18,
4,
18,
13,
17,
30,
3,
11,
1,
41,
13,
4,
18,
13,
4,
18,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
13,
17,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
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
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
17,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
27,
32
],
[
26,
33
],
[
33,
34
],
[
17,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
35,
45
],
[
45,
46
],
[
45,
47
],
[
35,
48
],
[
48,
49
],
[
49,
50
],
[
35,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
52,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
52,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
17,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
6,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int h = 0;\n while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }\n\n scanner.close();\n }\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 int h = 0;\n while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }\n\n scanner.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int h = 0;\n while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }\n\n scanner.close();\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int h = 0;\n while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }\n\n scanner.close();\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int h = 0;",
"h",
"0",
"while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }",
"true",
"{\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }",
"String in = scanner.nextLine();",
"in",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"StringBuilder m = new StringBuilder(in);",
"m",
"new StringBuilder(in)",
"if(m.toString().equals(\"-\")){\n break;\n }",
"m.toString().equals(\"-\")",
"m.toString().equals",
"m.toString()",
"m.toString",
"m",
"\"-\"",
"{\n break;\n }",
"break;",
"for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }",
"int i = Integer.parseInt(scanner.nextLine());",
"int i = Integer.parseInt(scanner.nextLine());",
"i",
"Integer.parseInt(scanner.nextLine())",
"Integer.parseInt",
"Integer",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }",
"{\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }",
"h = Integer.parseInt(scanner.nextLine())",
"h",
"Integer.parseInt(scanner.nextLine())",
"Integer.parseInt",
"Integer",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String sub = m.substring(0, h);",
"sub",
"m.substring(0, h)",
"m.substring",
"m",
"0",
"h",
"m.delete(0, h)",
"m.delete",
"m",
"0",
"h",
"m.append(sub)",
"m.append",
"m",
"sub",
"System.out.println(m.toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"m.toString()",
"m.toString",
"m",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int h = 0;\n while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }\n\n scanner.close();\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int h = 0;\n while(true){\n String in = scanner.nextLine();\n StringBuilder m = new StringBuilder(in);\n\n if(m.toString().equals(\"-\")){\n break;\n }\n\n for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){\n h = Integer.parseInt(scanner.nextLine());\n String sub = m.substring(0, h);\n m.delete(0, h);\n m.append(sub);\n }\n System.out.println(m.toString());\n }\n\n scanner.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int h = 0;
while(true){
String in = scanner.nextLine();
StringBuilder m = new StringBuilder(in);
if(m.toString().equals("-")){
break;
}
for(int i = Integer.parseInt(scanner.nextLine()); i > 0; i--){
h = Integer.parseInt(scanner.nextLine());
String sub = m.substring(0, h);
m.delete(0, h);
m.append(sub);
}
System.out.println(m.toString());
}
scanner.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
69,
5
],
[
69,
6
],
[
6,
7
],
[
6,
8
],
[
69,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
16,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
24,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
9,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
]
| [
"import java.util.*;\n\npublic class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n String str;\n while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n String str;\n while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }\n }\n}",
"Main",
"private static final Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"public static void main(String[] args) {\n String str;\n while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }\n }",
"main",
"{\n String str;\n while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }\n }",
"String str;",
"str",
"while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }",
"!(str = scn.next()).equals(\"-\")",
"(str = scn.next()).equals(\"-\")",
"(str = scn.next()).equals",
"(str = scn.next())",
"str",
"scn.next()",
"scn.next",
"scn",
"\"-\"",
"{\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }",
"int lim = scn.nextInt();",
"lim",
"scn.nextInt()",
"scn.nextInt",
"scn",
"for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lim",
"i",
"lim",
"i++",
"i++",
"i",
"{\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }",
"{\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }",
"int div = scn.nextInt();",
"div",
"scn.nextInt()",
"scn.nextInt",
"scn",
"str = str.substring(div) + str.substring(0, div)",
"str",
"str.substring(div) + str.substring(0, div)",
"str.substring(div)",
"str.substring",
"str",
"div",
"str.substring(0, div)",
"str.substring",
"str",
"0",
"div",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n String str;\n while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }\n }\n}",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n String str;\n while(!(str = scn.next()).equals(\"-\")) {\n int lim = scn.nextInt();\n for(int i = 0; i < lim; i++) {\n int div = scn.nextInt();\n str = str.substring(div) + str.substring(0, div);\n }\n System.out.println(str);\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
private static final Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
String str;
while(!(str = scn.next()).equals("-")) {
int lim = scn.nextInt();
for(int i = 0; i < lim; i++) {
int div = scn.nextInt();
str = str.substring(div) + str.substring(0, div);
}
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
13,
42,
17,
30,
14,
2,
13,
4,
18,
13,
30,
0,
13,
4,
18,
13,
30,
3,
0,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
2,
13,
13,
0,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
37,
42
],
[
31,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
31,
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
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
60,
66
],
[
66,
67
],
[
66,
68
],
[
31,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
72,
84
],
[
84,
85
],
[
31,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
31,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
94,
98
],
[
31,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
31,
107
],
[
107,
108
],
[
107,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
6,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
]
| [
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String card;\n int m = 0;\n int h = 0;\n int sum = 0;\n String ans1 = \"\";\n String ans2 = \"\";\n \n while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String card;\n int m = 0;\n int h = 0;\n int sum = 0;\n String ans1 = \"\";\n String ans2 = \"\";\n \n while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String card;\n int m = 0;\n int h = 0;\n int sum = 0;\n String ans1 = \"\";\n String ans2 = \"\";\n \n while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }\n sc.close();\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n String card;\n int m = 0;\n int h = 0;\n int sum = 0;\n String ans1 = \"\";\n String ans2 = \"\";\n \n while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String card;",
"card",
"int m = 0;",
"m",
"0",
"int h = 0;",
"h",
"0",
"int sum = 0;",
"sum",
"0",
"String ans1 = \"\";",
"ans1",
"\"\"",
"String ans2 = \"\";",
"ans2",
"\"\"",
"while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }",
"true",
"{\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }",
"card = sc.next()",
"card",
"sc.next()",
"sc.next",
"sc",
"if(card.equals(\"-\")) break;",
"card.equals(\"-\")",
"card.equals",
"card",
"\"-\"",
"break;",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n \n h = sc.nextInt();\n \n sum += h;\n \n }",
"{\n \n h = sc.nextInt();\n \n sum += h;\n \n }",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sum += h",
"sum",
"h",
"while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }",
"true",
"{\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }",
"if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }",
"sum>=card.length()",
"sum",
"card.length()",
"card.length",
"card",
"{\n sum-=card.length();\n }",
"sum-=card.length()",
"sum",
"card.length()",
"card.length",
"card",
"{\n break;\n }",
"break;",
"ans2 = card.substring(sum)",
"ans2",
"card.substring(sum)",
"card.substring",
"card",
"sum",
"ans1 = card.substring(0,sum)",
"ans1",
"card.substring(0,sum)",
"card.substring",
"card",
"0",
"sum",
"System.out.println(ans2 + ans1)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans2 + ans1",
"ans2",
"ans1",
"sum = 0",
"sum",
"0",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String card;\n int m = 0;\n int h = 0;\n int sum = 0;\n String ans1 = \"\";\n String ans2 = \"\";\n \n while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String card;\n int m = 0;\n int h = 0;\n int sum = 0;\n String ans1 = \"\";\n String ans2 = \"\";\n \n while( true ){\n \n card = sc.next();\n \n if(card.equals(\"-\")) break;\n \n m = sc.nextInt();\n \n for(int i=0;i<m;i++){\n \n h = sc.nextInt();\n \n sum += h;\n \n }\n \n while( true ){\n if(sum>=card.length()){\n sum-=card.length();\n }else{\n break;\n }\n \n }\n ans2 = card.substring(sum);\n ans1 = card.substring(0,sum);\n System.out.println(ans2 + ans1);\n \n sum = 0;\n \n }\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String card;
int m = 0;
int h = 0;
int sum = 0;
String ans1 = "";
String ans2 = "";
while( true ){
card = sc.next();
if(card.equals("-")) break;
m = sc.nextInt();
for(int i=0;i<m;i++){
h = sc.nextInt();
sum += h;
}
while( true ){
if(sum>=card.length()){
sum-=card.length();
}else{
break;
}
}
ans2 = card.substring(sum);
ans1 = card.substring(0,sum);
System.out.println(ans2 + ans1);
sum = 0;
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
2,
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
],
[
8,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
16,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
50,
54
],
[
42,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
42,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
24,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\n String card;\n while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\n String card;\n while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\n String card;\n while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }\n }",
"main",
"{\n Scanner reader = new Scanner(System.in);\n String card;\n while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }\n }",
"Scanner reader = new Scanner(System.in);",
"reader",
"new Scanner(System.in)",
"String card;",
"card",
"while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }",
"!(card = reader.next()).equals(\"-\")",
"(card = reader.next()).equals(\"-\")",
"(card = reader.next()).equals",
"(card = reader.next())",
"card",
"reader.next()",
"reader.next",
"reader",
"\"-\"",
"{\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }",
"int n = reader.nextInt();",
"n",
"reader.nextInt()",
"reader.nextInt",
"reader",
"for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }",
"{\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }",
"int m = reader.nextInt();",
"m",
"reader.nextInt()",
"reader.nextInt",
"reader",
"String card1 = card.substring(0, m);",
"card1",
"card.substring(0, m)",
"card.substring",
"card",
"0",
"m",
"String card2 = card.substring(m, card.length());",
"card2",
"card.substring(m, card.length())",
"card.substring",
"card",
"m",
"card.length()",
"card.length",
"card",
"card = card2 + card1",
"card",
"card2 + card1",
"card2",
"card1",
"System.out.println(card)",
"System.out.println",
"System.out",
"System",
"System.out",
"card",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\n String card;\n while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\n String card;\n while (!(card = reader.next()).equals(\"-\")) {\n int n = reader.nextInt();\n for (int i = 0; i < n; i++) {\n int m = reader.nextInt();\n String card1 = card.substring(0, m);\n String card2 = card.substring(m, card.length());\n card = card2 + card1;\n }\n System.out.println(card);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
String card;
while (!(card = reader.next()).equals("-")) {
int n = reader.nextInt();
for (int i = 0; i < n; i++) {
int m = reader.nextInt();
String card1 = card.substring(0, m);
String card2 = card.substring(m, card.length());
card = card2 + card1;
}
System.out.println(card);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
29,
0,
13,
4,
18,
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,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
4,
18,
13,
18,
13,
13,
4,
18,
13,
17,
18,
13,
13,
0,
13,
13,
0,
18,
13,
13,
13,
40,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
141,
5
],
[
141,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
38,
60
],
[
60,
61
],
[
61,
62
],
[
38,
63
],
[
27,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
27,
69
],
[
69,
70
],
[
69,
71
],
[
27,
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
],
[
90,
91
],
[
91,
92
],
[
27,
93
],
[
93,
94
],
[
93,
95
],
[
27,
96
],
[
96,
97
],
[
96,
98
],
[
27,
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
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
118,
120
],
[
114,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
111,
128
],
[
128,
129
],
[
128,
130
],
[
27,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
27,
136
],
[
136,
137
],
[
6,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s;\n int m;\n int h[];\n String ans[] = new String[11];\n int cnt = 0;\n\n while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }\n // System.out.println(\"cnt: \" + cnt);\n // for (int i = 0; i < cnt; i++) {\n // System.out.println(ans[i]);\n // }\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 String s;\n int m;\n int h[];\n String ans[] = new String[11];\n int cnt = 0;\n\n while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }\n // System.out.println(\"cnt: \" + cnt);\n // for (int i = 0; i < cnt; i++) {\n // System.out.println(ans[i]);\n // }\n // sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s;\n int m;\n int h[];\n String ans[] = new String[11];\n int cnt = 0;\n\n while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }\n // System.out.println(\"cnt: \" + cnt);\n // for (int i = 0; i < cnt; i++) {\n // System.out.println(ans[i]);\n // }\n // sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s;\n int m;\n int h[];\n String ans[] = new String[11];\n int cnt = 0;\n\n while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }\n // System.out.println(\"cnt: \" + cnt);\n // for (int i = 0; i < cnt; i++) {\n // System.out.println(ans[i]);\n // }\n // sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s;",
"s",
"int m;",
"m",
"int h[];",
"h",
"String ans[] = new String[11];",
"ans",
"new String[11]",
"11",
"int cnt = 0;",
"cnt",
"0",
"while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }",
"true",
"{\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }",
"s = sc.next()",
"s",
"sc.next()",
"sc.next",
"sc",
"if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"{\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }",
"for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < cnt",
"i",
"cnt",
"i++",
"i++",
"i",
"{\n System.out.println(ans[i]);\n }",
"{\n System.out.println(ans[i]);\n }",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"sc.close()",
"sc.close",
"sc",
"return;",
"m = sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"h = new int[m]",
"h",
"new int[m]",
"m",
"for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n h[i] = sc.nextInt();\n }",
"{\n h[i] = sc.nextInt();\n }",
"h[i] = sc.nextInt()",
"h[i]",
"h",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String tmp = s;",
"tmp",
"s",
"String ttmp = s;",
"ttmp",
"s",
"for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }",
"{\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }",
"ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]))",
"ttmp",
"(tmp.substring(h[i]) + tmp.substring(0, h[i]))",
"tmp.substring(h[i])",
"tmp.substring",
"tmp",
"h[i]",
"h",
"i",
"tmp.substring(0, h[i])",
"tmp.substring",
"tmp",
"0",
"h[i]",
"h",
"i",
"tmp = ttmp",
"tmp",
"ttmp",
"ans[cnt] = tmp",
"ans[cnt]",
"ans",
"cnt",
"tmp",
"cnt++",
"cnt",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s;\n int m;\n int h[];\n String ans[] = new String[11];\n int cnt = 0;\n\n while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }\n // System.out.println(\"cnt: \" + cnt);\n // for (int i = 0; i < cnt; i++) {\n // System.out.println(ans[i]);\n // }\n // sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s;\n int m;\n int h[];\n String ans[] = new String[11];\n int cnt = 0;\n\n while (true) {\n s = sc.next();\n if (s.equals(\"-\")) {\n for (int i = 0; i < cnt; i++) {\n System.out.println(ans[i]);\n }\n sc.close();\n return;\n }\n m = sc.nextInt();\n h = new int[m];\n for (int i = 0; i < m; i++) {\n h[i] = sc.nextInt();\n }\n\n String tmp = s;\n String ttmp = s;\n\n for (int i = 0; i < m; i++) {\n ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));\n tmp = ttmp;\n }\n ans[cnt] = tmp;\n cnt++;\n }\n // System.out.println(\"cnt: \" + cnt);\n // for (int i = 0; i < cnt; i++) {\n // System.out.println(ans[i]);\n // }\n // sc.close();\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s;
int m;
int h[];
String ans[] = new String[11];
int cnt = 0;
while (true) {
s = sc.next();
if (s.equals("-")) {
for (int i = 0; i < cnt; i++) {
System.out.println(ans[i]);
}
sc.close();
return;
}
m = sc.nextInt();
h = new int[m];
for (int i = 0; i < m; i++) {
h[i] = sc.nextInt();
}
String tmp = s;
String ttmp = s;
for (int i = 0; i < m; i++) {
ttmp = (tmp.substring(h[i]) + tmp.substring(0, h[i]));
tmp = ttmp;
}
ans[cnt] = tmp;
cnt++;
}
// System.out.println("cnt: " + cnt);
// for (int i = 0; i < cnt; i++) {
// System.out.println(ans[i]);
// }
// sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
17,
30,
3,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
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,
17,
4,
18,
13,
13,
4,
18,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
17,
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
],
[
133,
11
],
[
133,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
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
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
29,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
38,
48
],
[
48,
49
],
[
49,
50
],
[
38,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
20,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
20,
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
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
83,
85
],
[
77,
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
],
[
102,
103
],
[
101,
104
],
[
98,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
98,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
20,
113
],
[
113,
114
],
[
113,
115
],
[
113,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
20,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
12,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
]
| [
"import java.util.Scanner;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}",
"true",
"{\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}",
"ArrayList<Character> list = new ArrayList<Character>();",
"list",
"new ArrayList<Character>()",
"String input = sc.next();",
"input",
"sc.next()",
"sc.next",
"sc",
"if (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}",
"input.equals(\"-\") == true",
"input.equals(\"-\")",
"input.equals",
"input",
"\"-\"",
"true",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"for (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input.length()",
"i",
"input.length()",
"input.length",
"input",
"i++",
"i++",
"i",
"{\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}",
"{\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}",
"list.add(input.charAt(i))",
"list.add",
"list",
"input.charAt(i)",
"input.charAt",
"input",
"i",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<Character> subList = new ArrayList<Character>();",
"subList",
"new ArrayList<Character>()",
"for (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}",
"{\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}",
"char temp = list.get(0);",
"temp",
"list.get(0)",
"list.get",
"list",
"0",
"list.add(temp)",
"list.add",
"list",
"temp",
"list.remove(0)",
"list.remove",
"list",
"0",
"for (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}",
"char c",
"list",
"{\n\t\t\t\tSystem.out.print(c);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.print(c);\n\t\t\t}",
"System.out.print(c)",
"System.out.print",
"System.out",
"System",
"System.out",
"c",
"System.out.print(\"\\n\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"\\n\"",
"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\t\twhile (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}\n\t\t\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\t\twhile (true){\n\t\t\t//文字列のリスト\n\t\t\tArrayList<Character> list = new ArrayList<Character>();\n\t\t\n\t\t\t//データ入力\n\t\t\tString input = sc.next();\n\t\t\t\n\t\t\t//終了条件の判定\n\t\t\tif (input.equals(\"-\") == true){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\t//データをリストに格納\n\t\t\tfor (int i = 0; i < input.length(); i++){\n\t\t\t\tlist.add(input.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\t//データのシャッフル\n\t\t\tint m = sc.nextInt();//シャッフルの回数\n\t\t\tfor (int i = 0; i < m; i++){\n\t\t\t\t//次のシャッフル位置\n\t\t\t\tint h = sc.nextInt();\n\t\t\t\t\n\t\t\t\t//シャッフル\n\t\t\t\tArrayList<Character> subList = new ArrayList<Character>();\n\t\t\t\tfor (int j = 0; j < h; j++){\n\t\t\t\t\tchar temp = list.get(0);\n\t\t\t\t\tlist.add(temp);\n\t\t\t\t\tlist.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//結果を出力\n\t\t\tfor (char c : list){\n\t\t\t\tSystem.out.print(c);\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t}\n}",
"Main"
]
| import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while (true){
//文字列のリスト
ArrayList<Character> list = new ArrayList<Character>();
//データ入力
String input = sc.next();
//終了条件の判定
if (input.equals("-") == true){
break;
}
//データをリストに格納
for (int i = 0; i < input.length(); i++){
list.add(input.charAt(i));
}
//データのシャッフル
int m = sc.nextInt();//シャッフルの回数
for (int i = 0; i < m; i++){
//次のシャッフル位置
int h = sc.nextInt();
//シャッフル
ArrayList<Character> subList = new ArrayList<Character>();
for (int j = 0; j < h; j++){
char temp = list.get(0);
list.add(temp);
list.remove(0);
}
}
//結果を出力
for (char c : list){
System.out.print(c);
}
System.out.print("\n");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
105,
5
],
[
105,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
11,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
8,
31
],
[
31,
32
],
[
6,
33
],
[
33,
34
],
[
6,
35
],
[
35,
36
],
[
105,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
39,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
54,
59
],
[
48,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
48,
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
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
80,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
48,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
37,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public String shffl(String inS, int num) {\n String buf1 = inS.substring(0, num);\n String buf2 = inS.substring(num, inS.length());\n inS = buf2.concat(buf1);\n return inS;\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Main app = new Main();\n\n while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public String shffl(String inS, int num) {\n String buf1 = inS.substring(0, num);\n String buf2 = inS.substring(num, inS.length());\n inS = buf2.concat(buf1);\n return inS;\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Main app = new Main();\n\n while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }\n }\n}",
"Main",
"public String shffl(String inS, int num) {\n String buf1 = inS.substring(0, num);\n String buf2 = inS.substring(num, inS.length());\n inS = buf2.concat(buf1);\n return inS;\n }",
"shffl",
"{\n String buf1 = inS.substring(0, num);\n String buf2 = inS.substring(num, inS.length());\n inS = buf2.concat(buf1);\n return inS;\n }",
"String buf1 = inS.substring(0, num);",
"buf1",
"inS.substring(0, num)",
"inS.substring",
"inS",
"0",
"num",
"String buf2 = inS.substring(num, inS.length());",
"buf2",
"inS.substring(num, inS.length())",
"inS.substring",
"inS",
"num",
"inS.length()",
"inS.length",
"inS",
"inS = buf2.concat(buf1)",
"inS",
"buf2.concat(buf1)",
"buf2.concat",
"buf2",
"buf1",
"return inS;",
"inS",
"String inS",
"inS",
"int num",
"num",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Main app = new Main();\n\n while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n Main app = new Main();\n\n while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"Main app = new Main();",
"app",
"new Main()",
"while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }",
"true",
"{\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }",
"String pattern = scan.next();",
"pattern",
"scan.next()",
"scan.next",
"scan",
"if (pattern.equals(\"-\")) break;",
"pattern.equals(\"-\")",
"pattern.equals",
"pattern",
"\"-\"",
"break;",
"int times = Integer.parseInt(scan.next());",
"times",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < times",
"i",
"times",
"i++",
"i++",
"i",
"{\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }",
"{\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }",
"int num = Integer.parseInt(scan.next());",
"num",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"pattern = app.shffl(pattern, num)",
"pattern",
"app.shffl(pattern, num)",
"app.shffl",
"app",
"pattern",
"num",
"System.out.println(pattern)",
"System.out.println",
"System.out",
"System",
"System.out",
"pattern",
"String[] args",
"args",
"public class Main {\n\n public String shffl(String inS, int num) {\n String buf1 = inS.substring(0, num);\n String buf2 = inS.substring(num, inS.length());\n inS = buf2.concat(buf1);\n return inS;\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Main app = new Main();\n\n while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }\n }\n}",
"public class Main {\n\n public String shffl(String inS, int num) {\n String buf1 = inS.substring(0, num);\n String buf2 = inS.substring(num, inS.length());\n inS = buf2.concat(buf1);\n return inS;\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Main app = new Main();\n\n while(true) {\n String pattern = scan.next();\n if (pattern.equals(\"-\")) break;\n int times = Integer.parseInt(scan.next());\n for (int i = 0; i < times; i++) {\n int num = Integer.parseInt(scan.next());\n pattern = app.shffl(pattern, num);\n }\n System.out.println(pattern);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public String shffl(String inS, int num) {
String buf1 = inS.substring(0, num);
String buf2 = inS.substring(num, inS.length());
inS = buf2.concat(buf1);
return inS;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
Main app = new Main();
while(true) {
String pattern = scan.next();
if (pattern.equals("-")) break;
int times = Integer.parseInt(scan.next());
for (int i = 0; i < times; i++) {
int num = Integer.parseInt(scan.next());
pattern = app.shffl(pattern, num);
}
System.out.println(pattern);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
40,
4,
18,
0,
13,
4,
18,
13,
17,
30,
41,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
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
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
23,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
31,
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
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
74,
78
],
[
31,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
12,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line = \"\";",
"line",
"\"\"",
"while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }",
"!(line = br.readLine()).equals(\"-\")",
"(line = br.readLine()).equals(\"-\")",
"(line = br.readLine()).equals",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"\"-\"",
"{\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }",
"String s = line;",
"s",
"line",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }",
"{\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }",
"int m = Integer.parseInt(br.readLine());",
"m",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"s = s.substring(m, s.length()) + s.substring(0, m)",
"s",
"s.substring(m, s.length()) + s.substring(0, m)",
"s.substring(m, s.length())",
"s.substring",
"s",
"m",
"s.length()",
"s.length",
"s",
"s.substring(0, m)",
"s.substring",
"s",
"0",
"m",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = \"\";\n while (!(line = br.readLine()).equals(\"-\")) {\n String s = line;\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n int m = Integer.parseInt(br.readLine());\n s = s.substring(m, s.length()) + s.substring(0, m);\n }\n System.out.println(s);\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
while (!(line = br.readLine()).equals("-")) {
String s = line;
int n = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
int m = Integer.parseInt(br.readLine());
s = s.substring(m, s.length()) + s.substring(0, m);
}
System.out.println(s);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
0,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
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,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
2,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
17,
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
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
39,
44
],
[
44,
45
],
[
33,
46
],
[
46,
47
],
[
46,
48
],
[
33,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
33,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
33,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
33,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
33,
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
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
97,
109
],
[
109,
110
],
[
110,
111
],
[
97,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
96,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
125,
135
],
[
135,
136
],
[
136,
137
],
[
125,
138
],
[
139,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
96,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
96,
152
],
[
152,
153
],
[
152,
154
],
[
96,
155
],
[
155,
156
],
[
155,
157
],
[
33,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
9,
164
],
[
164,
165
]
]
| [
"import java.io.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString word = \"\";\t\t//???????????????string\n\t\tint[] shuffleBegin = new int[100]; //?????£?????????????§????\n\t\tString targetText = \"\";\n\t\tString temp = \"\";\n\t\tString kansei = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttargetText = temp;\n\t\t\tchar[] targetChar = targetText.toCharArray();\n\t\t\tint targetLength = targetText.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\t\n\t\t\tfor(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}\n\t\t\tSystem.out.println(kansei);\t\t\n\t\t\t\n\t\t}\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString word = \"\";\t\t//???????????????string\n\t\tint[] shuffleBegin = new int[100]; //?????£?????????????§????\n\t\tString targetText = \"\";\n\t\tString temp = \"\";\n\t\tString kansei = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttargetText = temp;\n\t\t\tchar[] targetChar = targetText.toCharArray();\n\t\t\tint targetLength = targetText.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\t\n\t\t\tfor(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}\n\t\t\tSystem.out.println(kansei);\t\t\n\t\t\t\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)throws NumberFormatException, IOException{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString word = \"\";\t\t//???????????????string\n\t\tint[] shuffleBegin = new int[100]; //?????£?????????????§????\n\t\tString targetText = \"\";\n\t\tString temp = \"\";\n\t\tString kansei = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttargetText = temp;\n\t\t\tchar[] targetChar = targetText.toCharArray();\n\t\t\tint targetLength = targetText.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\t\n\t\t\tfor(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}\n\t\t\tSystem.out.println(kansei);\t\t\n\t\t\t\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString word = \"\";\t\t//???????????????string\n\t\tint[] shuffleBegin = new int[100]; //?????£?????????????§????\n\t\tString targetText = \"\";\n\t\tString temp = \"\";\n\t\tString kansei = \"\";\n\t\twhile(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttargetText = temp;\n\t\t\tchar[] targetChar = targetText.toCharArray();\n\t\t\tint targetLength = targetText.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\t\n\t\t\tfor(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}\n\t\t\tSystem.out.println(kansei);\t\t\n\t\t\t\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String word = \"\";",
"word",
"\"\"",
"int[] shuffleBegin = new int[100];",
"shuffleBegin",
"new int[100]",
"100",
"String targetText = \"\";",
"targetText",
"\"\"",
"String temp = \"\";",
"temp",
"\"\"",
"String kansei = \"\";",
"kansei",
"\"\"",
"while(true){\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttargetText = temp;\n\t\t\tchar[] targetChar = targetText.toCharArray();\n\t\t\tint targetLength = targetText.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\t\n\t\t\tfor(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}\n\t\t\tSystem.out.println(kansei);\t\t\n\t\t\t\n\t\t}",
"true",
"{\n\t\t\ttemp = scan.next();\n\t\t\tif(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttargetText = temp;\n\t\t\tchar[] targetChar = targetText.toCharArray();\n\t\t\tint targetLength = targetText.length();\n\t\t\tint shuffleTimes = scan.nextInt();\n\t\t\t\n\t\t\tfor(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}\n\t\t\tSystem.out.println(kansei);\t\t\n\t\t\t\n\t\t}",
"temp = scan.next()",
"temp",
"scan.next()",
"scan.next",
"scan",
"if(temp.equals(\"-\")){\n\t\t\t\tbreak;\n\t\t\t}",
"temp.equals(\"-\")",
"temp.equals",
"temp",
"\"-\"",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"targetText = temp",
"targetText",
"temp",
"char[] targetChar = targetText.toCharArray();",
"targetChar",
"targetText.toCharArray()",
"targetText.toCharArray",
"targetText",
"int targetLength = targetText.length();",
"targetLength",
"targetText.length()",
"targetText.length",
"targetText",
"int shuffleTimes = scan.nextInt();",
"shuffleTimes",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i=0; i<shuffleTimes; i++){\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<shuffleTimes",
"i",
"shuffleTimes",
"i++",
"i++",
"i",
"{\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\tshuffleBegin[i] = scan.nextInt();\n\t\t\t\t\n\t\t\t}",
"shuffleBegin[i] = scan.nextInt()",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i =0;i<shuffleTimes; i++){\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<shuffleTimes",
"i",
"shuffleTimes",
"i++",
"i++",
"i",
"{\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}",
"{\n\t\t\t\tfor(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t\tfor(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\ttargetChar = word.toCharArray();\n\t\t\tkansei = word;\n\t\t\tword = \"\";\n\t\t\t}",
"for(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}",
"int ii=0;",
"int ii=0;",
"ii",
"0",
"ii<(targetLength - shuffleBegin[i])",
"ii",
"(targetLength - shuffleBegin[i])",
"targetLength",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"ii++",
"ii++",
"ii",
"{\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}",
"{\n\t\t\t\t\tword = word + targetChar[ii + shuffleBegin[i]];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}",
"word = word + targetChar[ii + shuffleBegin[i]]",
"word",
"word + targetChar[ii + shuffleBegin[i]]",
"word",
"targetChar[ii + shuffleBegin[i]]",
"targetChar",
"ii + shuffleBegin[i]",
"ii",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"for(int ii=0; ii<shuffleBegin[i]; ii++){\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}",
"int ii=0;",
"int ii=0;",
"ii",
"0",
"ii<shuffleBegin[i]",
"ii",
"shuffleBegin[i]",
"shuffleBegin",
"i",
"ii++",
"ii++",
"ii",
"{\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}",
"{\n\t\t\t\t\tword = word + targetChar[ii];\n//\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}",
"word = word + targetChar[ii]",
"word",
"word + targetChar[ii]",
"word",
"targetChar[ii]",
"targetChar",
"ii",
"targetChar = word.toCharArray()",
"targetChar",
"word.toCharArray()",
"word.toCharArray",
"word",
"kansei = word",
"kansei",
"word",
"word = \"\"",
"word",
"\"\"",
"System.out.println(kansei)",
"System.out.println",
"System.out",
"System",
"System.out",
"kansei",
"String[] args",
"args"
]
| import java.io.IOException;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws NumberFormatException, IOException{
Scanner scan = new Scanner(System.in);
String word = ""; //???????????????string
int[] shuffleBegin = new int[100]; //?????£?????????????§????
String targetText = "";
String temp = "";
String kansei = "";
while(true){
temp = scan.next();
if(temp.equals("-")){
break;
}
targetText = temp;
char[] targetChar = targetText.toCharArray();
int targetLength = targetText.length();
int shuffleTimes = scan.nextInt();
for(int i=0; i<shuffleTimes; i++){
shuffleBegin[i] = scan.nextInt();
}
for(int i =0;i<shuffleTimes; i++){
for(int ii=0; ii<(targetLength - shuffleBegin[i]) ; ii++){
word = word + targetChar[ii + shuffleBegin[i]];
// System.out.println(word);
}
for(int ii=0; ii<shuffleBegin[i]; ii++){
word = word + targetChar[ii];
// System.out.println(word);
}
targetChar = word.toCharArray();
kansei = word;
word = "";
}
System.out.println(kansei);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
3,
41,
13,
4,
18,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
13,
0,
13,
2,
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
],
[
93,
8
],
[
93,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
15,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
36,
41
],
[
41,
42
],
[
30,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
49,
50
],
[
30,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
55,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
55,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
55,
82
],
[
82,
83
],
[
30,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
9,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
]
| [
"import java.util.NoSuchElementException;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }\n }\n}\n",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"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 try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }",
"catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }",
"NoSuchElementException\n | NumberFormatException e",
"{\n System.out.println(e);\n }",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n }",
"while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (s.equals(\"-\")) {\n break;\n }",
"s.equals(\"-\")",
"s.equals",
"s",
"\"-\"",
"{\n break;\n }",
"break;",
"int m = Integer.parseInt(sc.nextLine());",
"m",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }",
"m > 0",
"m",
"0",
"{\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }",
"int h = Integer.parseInt(sc.nextLine());",
"h",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String s1 = s.substring(0, h);",
"s1",
"s.substring(0, h)",
"s.substring",
"s",
"0",
"h",
"String s2 = s.substring(h);",
"s2",
"s.substring(h)",
"s.substring",
"s",
"h",
"s = s2 + s1",
"s",
"s2 + s1",
"s2",
"s1",
"--m",
"m",
"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 try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n try {\n while (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.equals(\"-\")) {\n break;\n }\n int m = Integer.parseInt(sc.nextLine());\n while (m > 0) {\n int h = Integer.parseInt(sc.nextLine());\n String s1 = s.substring(0, h);\n String s2 = s.substring(h);\n s = s2 + s1;\n --m;\n }\n System.out.println(s);\n }\n } catch (NoSuchElementException\n | NumberFormatException e) {\n System.out.println(e);\n }\n }\n}",
"Main"
]
| import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
while (sc.hasNext()) {
String s = sc.nextLine();
if (s.equals("-")) {
break;
}
int m = Integer.parseInt(sc.nextLine());
while (m > 0) {
int h = Integer.parseInt(sc.nextLine());
String s1 = s.substring(0, h);
String s2 = s.substring(h);
s = s2 + s1;
--m;
}
System.out.println(s);
}
} catch (NoSuchElementException
| NumberFormatException e) {
System.out.println(e);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
38,
30,
14,
2,
13,
17,
4,
18,
13,
30,
0,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
3,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
12,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
27,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
27,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
6,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
]
| [
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = null;\n\t\ttry{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = null;\n\t\ttry{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = null;\n\t\ttry{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = null;\n\t\ttry{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}\n\t}",
"Scanner scan = null;",
"scan",
"null",
"try{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}",
"{\n\t\t\tif(scan!=null)scan.close();\n\t\t}",
"if(scan!=null)scan.close();",
"scan!=null",
"scan",
"null",
"scan.close()",
"scan.close",
"scan",
"{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}",
"scan = new Scanner(System.in)",
"scan",
"new Scanner(System.in)",
"while(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}",
"true",
"{\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}",
"String str = scan.next();",
"str",
"scan.next()",
"scan.next",
"scan",
"if(str.equals(\"-\"))break;",
"str.equals(\"-\")",
"str.equals",
"str",
"\"-\"",
"break;",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }",
"{\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }",
"int data = scan.nextInt();",
"data",
"scan.nextInt()",
"scan.nextInt",
"scan",
"str = str.substring(data,str.length()) + str.substring(0,data)",
"str",
"str.substring(data,str.length()) + str.substring(0,data)",
"str.substring(data,str.length())",
"str.substring",
"str",
"data",
"str.length()",
"str.length",
"str",
"str.substring(0,data)",
"str.substring",
"str",
"0",
"data",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = null;\n\t\ttry{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = null;\n\t\ttry{\n\t\t\tscan = new Scanner(System.in);\n\t\t\twhile(true){\n\t\t\t\t String str = scan.next();\n\t\t\t\t if(str.equals(\"-\"))break;\n\t\t\t\t int n = scan.nextInt();\n\t\t\t\t for(int i = 0 ;i < n;i++){\n\t\t\t\t\t int data = scan.nextInt();\n\t\t\t\t\t str = str.substring(data,str.length()) + str.substring(0,data);\n\t\t\t\t }\n\t\t\t\t System.out.println(str);\n\t\t\t}\n\t\t}finally{\n\t\t\tif(scan!=null)scan.close();\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = null;
try{
scan = new Scanner(System.in);
while(true){
String str = scan.next();
if(str.equals("-"))break;
int n = scan.nextInt();
for(int i = 0 ;i < n;i++){
int data = scan.nextInt();
str = str.substring(data,str.length()) + str.substring(0,data);
}
System.out.println(str);
}
}finally{
if(scan!=null)scan.close();
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.