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.
2 parents 2ef31e5 + 9362a19 commit cb4c222Copy full SHA for cb4c222
suyeun84/202506/30 BOJ G4 음식 평론가.md
@@ -0,0 +1,25 @@
1
+```java
2
+import java.io.*;
3
+import java.util.*;
4
+
5
+public class boj1188 {
6
+ static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
7
+ static StringTokenizer st;
8
+ static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());}
9
+ static int nextInt() {return Integer.parseInt(st.nextToken());}
10
11
+ public static void main(String[] args) throws Exception {
12
+ nextLine();
13
+ int N = nextInt();
14
+ int M = nextInt();
15
16
+ int div = M;
17
+ while(div > 0) {
18
+ int temp = N;
19
+ N = div;
20
+ div = temp % div;
21
+ }
22
+ System.out.println(M - N);
23
24
+}
25
+```
0 commit comments