[백준] 1181번: 단어 정렬 - JAVA
·
알고리즘
[작성일: 2023. 10. 23] https://www.acmicpc.net/problem/1181  풀이import java.util.ArrayList;import java.util.Collections;import java.util.HashSet;import java.util.List;import java.util.Scanner;import java.util.Set;public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String[] strArr = new String..
[백준] 11650번: 좌표 정렬하기 - JAVA
·
알고리즘
[작성일: 2023. 10. 19] https://www.acmicpc.net/problem/11650  풀이import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.valueOf(br.readLine()); int[][] arr = new int[n][2]; ..
[백준] 10989번: 수 정렬하기 3 - JAVA
·
알고리즘
[작성일: 2023. 10. 16] https://www.acmicpc.net/problem/10989  풀이import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.valueOf(br.readLine()); int[]..
[백준] 2751번: 수 정렬하기 2 - JAVA
·
알고리즘
[작성일: 2023. 10. 16] https://www.acmicpc.net/problem/2751  풀이import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.IOException;import java.io.InputStreamReader;import java.io.OutputStreamWriter;import java.util.ArrayList;import java.util.Collections;import java.util.List;import java.util.StringTokenizer;public class Main { public static void main(String[] args) throws IOEx..
[백준] 19532번: 수학은 비대면강의입니다 - JAVA
·
알고리즘
[작성일: 2023. 10. 13] https://www.acmicpc.net/problem/19532  풀이import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int e = sc.nextInt(); int f = sc.nextInt(); int x = 0, y = 0; ..
[백준] 2231번: 분해합 - JAVA
·
알고리즘
[작성일: 2023. 10. 12]  https://www.acmicpc.net/problem/2231  풀이import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); boolean check = true; for (int i = 0; i 0) { sum += num % 10; num /= 10; } if (sum + i == n) { ..