diff --git a/code_study/Baekjoon/java/_27172.java b/code_study/Baekjoon/java/_27172.java new file mode 100644 index 0000000..0fba837 --- /dev/null +++ b/code_study/Baekjoon/java/_27172.java @@ -0,0 +1,30 @@ +import java.util.*; + +public class _27172 { + static int MAX_N = 1000001; + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int N = Integer.parseInt(sc.nextLine()); + int[] nums = Arrays.stream(sc.nextLine().split(" ")) + .mapToInt(Integer::parseInt) + .toArray(); + sc.close(); + + int[] scores = new int[MAX_N]; + boolean[] cards = new boolean[MAX_N]; + for (int n : nums) { + cards[n] = true; + } + + for(int i=0; i