백준5597: 과제 안 내신 분..?
문제
https://www.acmicpc.net/problem/5597
문제 풀이
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] student = new int[31];
for (int i = 1; i < 29; i++) {
student[sc.nextInt()] = 1;
}
for (int i = 1; i < student.length; i++) {
if (student[i] != 1) {
System.out.print(i+" ");
}
}
}
}
댓글남기기