We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3792e3c + 83549aa commit 99110f0Copy full SHA for 99110f0
1 file changed
JHLEE325/202603/17 BOJ G4 잠수함식별.md
@@ -0,0 +1,19 @@
1
+```java
2
+import java.io.*;
3
+import java.util.*;
4
+
5
+public class Main {
6
+ public static void main(String[] args) throws Exception {
7
+ BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
8
+ String sound = br.readLine();
9
10
+ String regex = "(100+1+|01)+";
11
12
+ if (sound.matches(regex)) {
13
+ System.out.println("SUBMARINE");
14
+ } else {
15
+ System.out.println("NOISE");
16
+ }
17
18
+}
19
+```
0 commit comments