본문 바로가기
반응형

코딩테스트 문제집73

[Programmers] Lv1: 2016년(12901) 문제- 링크: https://school.programmers.co.kr/learn/courses/30/lessons/12901 풀이더보기 2025. 2. 10.
[Programmers] Lv1: 폰켓몬(1845) 문제- 링크: https://school.programmers.co.kr/learn/courses/30/lessons/1845 풀이더보기더보기더보기import java.util.Arrays;class Solution { public int solution(int[] nums) { int numsDistinctLength = (int)Arrays.stream(nums).distinct().count(); return Math.min(numsDistinctLength, nums.length / 2); }} 2025. 2. 10.
[Softeer] Lv1: 메리 크리스마스(9660) 문제- 링크: https://softeer.ai/practice/9660 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { String xMas = "## ## ## ##### ##### ## ## ## ## ## ## ## ####\n" + "## ## #### ## ## ## ## ## ## ## ## ### ### #### ## ##\n" + "#.. 2025. 2. 9.
[Softeer] Lv1: 나무 출력(9655) 문제- 링크: https://softeer.ai/practice/9655 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { String tree = " ********* \n" + " ***** **** \n" + " ** ** \n" + " * * \n" + " ** ** \n".. 2025. 2. 9.
[Softeer] Lv1: 효도의 시작(7724) 문제- 링크: https://softeer.ai/practice/7724 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { System.out.print("엄마 아빠 사랑해요!"); }} 2025. 2. 9.
[Softeer] Lv1: 개표(7698) 문제- 링크: https://softeer.ai/practice/7698 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 0; i 2025. 2. 9.
[Softeer] Lv1: Tren del Fin del Mundo(7695) 문제- 링크: https://softeer.ai/practice/7695 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int locX = 1_000; int locY = 1_000; for (int i = 0; i 2025. 2. 9.
[Softeer] Lv1: 연탄 배달의 시작(7626) 문제- 링크: https://softeer.ai/practice/7626 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] towns = new long[n]; for (int i = 0; i 2025. 2. 9.
[Softeer] Lv1: 나무 심기(7353) 문제- 링크: https://softeer.ai/practice/7353 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] ground = new int[n]; for (int i = 0; i b) ? a : b; System.out.println(maxValue); }} 2025. 2. 9.
[Softeer] Lv1: A+B(6295) 문제- 링크: https://softeer.ai/practice/6295 풀이더보기import java.io.*;import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 0; i 2025. 2. 9.
반응형