1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import java.util.*;
public class Baekjoon5597 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] student = new int[31]; // 31개의 배열을 만들어줌 만약 9번째 줄에서 i를 0으로 해두고 30으로 해줘도 무관함.
for(int i=1; i<29; i++) {
int success = sc.nextInt();
student[success] = 1;
}
for(int i=1; i<student.length; i++) {
if(student[i]!=1)
System.out.println(i);
}
sc.close();
}
}
|
cs |
'Algorithm' 카테고리의 다른 글
백준 문자열 9086 (0) | 2023.08.26 |
---|---|
백준 단어 길이 재기 2743 (0) | 2023.08.26 |
백준 문자열 27866 (0) | 2023.08.24 |
백준 별 찍기 2438 (0) | 2023.08.24 |
백준 알람 45분 빨리 2884 (0) | 2023.08.24 |