package org.example.바이러스; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.InvalidObjectException; import java.text.MessageFormat; import java.util.*; /* * * * * * * * * * */ public class Main { public static void main(String[] args) { // 해당 문제는 출력이 1회라 별도 PrintWriter를 사용하지 않고 System.out.println()을 사용하였다. try (BufferedReader br = new Buf..
package org.example.수찾기; import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) ) { int n = Integer.parseInt(br.readLine()); String inputForCheck = br.readLine(); StringTokenizer st = n..
package org.example.통계학; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.MessageFormat; import java.util.*; /* * * * * * * * * N 개의 수 * N 은 홀수 * 1 System.out.println(number.getValue())); // 최빈값 HashMap numberCountMap = new HashMap(); for (Number number : numbers) { int count = numberCountMap.getOrDefault(number, 0); numberCountMap.put..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.MessageFormat; import java.util.HashSet; import java.util.Objects; import java.util.Set; import java.util.StringTokenizer; /* ** * 터렛 * * * **/ public class Main { public static void main(String[] args) { try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ) {..
package org.example.스택수열; import java.io.*; import java.text.MessageFormat; import java.util.Arrays; import java.util.Objects; import java.util.Stack; public class Main { public static void main(String[] args) { try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) ) { int n = Integ..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.MessageFormat; import java.util.Objects; import java.util.StringTokenizer; /* * * * * * * * * */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokeni..