자바 메소드 26

백준[JAVA] 2231.분해합 - 자바

📖 문제 📃 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); System.out.println(constructor(N)); } public static int constructor(int num) { int result = 0; for (..

백준[JAVA] 10828.스택 - 자바

📖 문제 📃 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static int stack[]; public static int size = 0; public static int N; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBu..

백준[JAVA] 11650.좌표 정렬하기 - 자바

📖 문제 📃 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Comparator; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); int[][] arr ..

백준[JAVA] 10989.수 정렬하기 3- 자바

📖 문제 📃 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { StringBuilder sb = new StringBuilder(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int size = Integer.parseInt(br.readLine()); // Counting Sort int cnt[] = new int[10001]; /* * input * 1

백준[JAVA] 2745.진법 변환 - 자바

📖 문제 📃 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static int parseDigit(String N, int digit) { int temp = 1; int ans = 0; for (int i = N.length() - 1; i >= 0; i--) { char c = N.charAt(i); if ('A' = c) { // B - A = 1, 1 + 10(over Decimal), temp = digit ans += (c - 'A' + 10) * temp; } else { ans += (c - '0') * temp; } ..