본문 바로가기

Java612

[백준/Java] 18229번 내가 살게, 아냐 내가 살게 -Codeimport java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.StringTokenizer;public class BOJ18229 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nex.. 2025. 11. 11.
[백준/Java] 15239번 Password check -Codeimport java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class BOJ15239 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); for (int i = 0; i 2025. 11. 10.
[백준/Java] 17136번 색종이 붙이기 -Codeimport java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.StringTokenizer;public class BOJ17136 { static int[][] paper = new int[10][10]; static int[] colorPaperCnt = {0, 5, 5, 5, 5, 5}; static int answer = Integer.MAX_VALUE; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(.. 2025. 11. 9.
[백준/Java] 12518번 Centauri Prime (Small2) -Codeimport java.util.Scanner;public class BOJ12518 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int t = 1; t 2025. 11. 9.
[백준/Java] 31866번 손가락 게임 -Codeimport java.util.Scanner;public class BOJ31866 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int jun = sc.nextInt(); int ik = sc.nextInt(); System.out.println(whoWins(jun, ik)); } public static String whoWins(int h1, int h2) { boolean junValid = checkFinger(h1); boolean ikValid = checkFinger(h2); // .. 2025. 11. 8.
[백준/Java] 17026번 Shell Game -Codeimport java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class BOJ17027 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int n =.. 2025. 11. 7.