-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestClass.java
More file actions
38 lines (32 loc) · 994 Bytes
/
TestClass.java
File metadata and controls
38 lines (32 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class TestClass {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st;
int T = Integer.parseInt(br.readLine());
while(T --> 0) {
st = new StringTokenizer(br.readLine());
int target = Integer.parseInt(st.nextToken());
String str = st.nextToken();
ArrayList<Character> list = new ArrayList<Character>();
for(int row=0;row<str.length();row++) {
list.add((char) str.codePointAt(row));
}
list.remove(target-1);
for(Character result : list) {
bw.write(result+"");
}
bw.write("\n");
}
br.close();
bw.flush();
bw.close();
}
}