본문 바로가기

Mathematics17

백준 1850 ▶ 1850번 문제 - 최대공약수 ▶ 풀이방법 ++ 9613번 문제와 비슷( https://shinny.tistory.com/154 ) import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringTokenizer st = new StringTokenizer(br.readLine()); .. 2022. 3. 31.
백준 9613 ▶ 9613문제 - GCD합 ▶ 풀이방법 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int count = Integer.parseInt(br.readLine()); for(int i = 0 ; i < count; i++) { StringTokenizer st = new String.. 2022. 3. 30.
백준 1934 ▶ 1934번 문제 - 최소공배수 2609번 문제와 비슷( https://shinny.tistory.com/152 ) ▶ 풀이방법 import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int count = Integer.parseInt(br.readLine()); for(int i = 0 .. 2022. 3. 30.
백준 2609 ▶ 2609번 문제 - 최대공약수와 최소공배수 ▶ 풀이방법 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); .. 2022. 3. 30.