본문 바로가기

Algorithm/BaekJoon[Java]67

백준 10809 ▶ 10809번 문제 - 알파벳 찾기 ▶ 풀이방법 import java.io.*; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String str = br.readLine(); int[] arr = new int[26]; Arrays.fill(arr, -1); /*for(int i = 0; i < 26.. 2022. 3. 25.
백준 10808 ▶ 10808문제 - 알파벳 개수 ▶ 풀이방법 1. import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String str = br.readLine(); char[] arr = new char[26]; int[] arr2 = new int[26]; for(int i = 0; i < 26; i++) { arr[i] = (.. 2022. 3. 25.
백준 10824 ▶ 백준 10824문제 - 네 수 ▶ 풀이방법 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.StringTokenizer; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)).. 2022. 3. 25.
백준 11656 ▶ 백준 11656 문제 - 접미사 배열 ▶ 풀이방법 import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String str = br.readLine(); ArrayList list = new ArrayList(); for(int i = 0; i < str.length(); i++) .. 2022. 3. 25.