-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboj12605.java
More file actions
26 lines (21 loc) · 870 Bytes
/
boj12605.java
File metadata and controls
26 lines (21 loc) · 870 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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class boj12605 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
StringBuilder sb = new StringBuilder();
int T = Integer.parseInt(st.nextToken());
for (int i = 1; i <= T; i++) {
String[] str = br.readLine().split(" ");
StringBuilder sbr = new StringBuilder();
for (int j = str.length - 1; j >= 0; j--) {
sbr.append(str[j]).append(" ");
}
sb.append("Case #").append(i).append(": ").append(sbr).append("\n");
}
System.out.println(sb.toString());
}
}