We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a200638 commit fa3512cCopy full SHA for fa3512c
BOJ/18245/Main.java
@@ -0,0 +1,29 @@
1
+/*
2
+ * Author: Minho Kim (ISKU)
3
+ * Date: January 10, 2020
4
+ * E-mail: minho.kim093@gmail.com
5
+ *
6
+ * https://github.com/ISKU/Algorithm
7
+ * https://www.acmicpc.net/problem/18245
8
+ */
9
+
10
+import java.io.*;
11
12
+public class Main {
13
+ public static void main(String[] args) throws Exception {
14
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
15
+ BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
16
17
+ for (int d = 1; ; d++) {
18
+ String line = br.readLine();
19
+ if (line.equals("Was it a cat I saw?"))
20
+ break;
21
22
+ for (int i = 0; i < line.length(); i += d + 1)
23
+ bw.write(line.charAt(i));
24
+ bw.write('\n');
25
+ }
26
27
+ bw.close();
28
29
+}
0 commit comments