브루트포스 4

백준[JAVA] 1436.영화감독 숌- 자바

📖 문제 📃 코드 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()); int MovieName = makeMovieName(N); System.out.println(MovieName); } private static int makeMovieName(..

백준[JAVA] 1929.소수 구하기 - 자바

📖 문제 📃 코드 1. Bruteforce + sqrt import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; 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 StringTokenizer(br.readLine(), " "); int M = Integer.parseInt..

백준[JAVA] 7568.덩치 - 자바

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

백준[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 (..