[백준][Java] 5597 - 과제 안 내신 분..?
2023. 7. 21. 16:17
백준/Java
https://www.acmicpc.net/problem/5597 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); boolean[] checkStudent = new boolean[31]; for (int submit = 0; submit < 28; submit++) { checkStudent[scanner.nextInt()] = true; } for (int notSubmit = 1; notSubmit HTML 삽입 미리보기할 수 없는 소스 참고 1. https://hellodoor.tistory.com/234
[백준][Java] 15552 - 빠른 A+B
2023. 7. 21. 16:14
백준/Java
https://www.acmicpc.net/problem/15552 import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int testCase = Integer.parseInt(bf.readLine()); for (int plusLoop = 0; plusLoop < testCase; plusLoop++) { String..
[백준][Java] 10807 - 개수 세기
2023. 7. 20. 01:53
백준/Java
https://www.acmicpc.net/problem/10807 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int[] numArr = new int[N]; for (int addNum = 0; addNum < N; addNum++) { numArr[addNum] = scanner.nextInt(); } int v = scanner.nextInt(); int cnt = 0; for (int compare = 0; compare < N; compare++) { if (v ..
[백준][Java] 10871 - X보다 작은 수
2023. 7. 20. 00:57
백준/Java
https://www.acmicpc.net/problem/10871 import java.io.*; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int X = scanner.nextInt(); int[] numArr = new int[N]; for (int loop = 0; loop < N; loop++) { numArr[loop] = scanner.nextInt(); if (numArr[loop] < X) { System.out.println(numArr[loop]); }..
[백준][Java] 10952 - A+B - 5
2023. 7. 11. 22:56
백준/Java
https://www.acmicpc.net/problem/10952 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int numA = 0; int numB = 0; while (scanner.hasNext()) { numA = scanner.nextInt(); numB = scanner.nextInt(); if (numA > 0 && numB < 10) { System.out.println(numA + numB); } else if (numA == 0 && numB == 0) { break; } } scanner.close..