티스토리 뷰
1411 : 빠진 카드
import java.util.Scanner;
// 210126
// 1411 : 빠진 카드
public class CU1411 {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
boolean[] v = new boolean[N+1];
for (int i=0; i<N-1; i++) {
v[sc.nextInt()] = true;
}
for (int i=1; i<=N; i++) {
if (!v[i]) System.out.println(i);
}
sc.close();
}
}
'코딩테스트 > 코드업' 카테고리의 다른 글
[Code Up] 1416 : 2진수 변환 (0) | 2021.01.26 |
---|---|
[Code Up] 1412 : 알파벳 개수 출력하기 (0) | 2021.01.26 |
[CodeUp] 1410 : 올바른 괄호 1, 3129 : 올바른 괄호 2 (0) | 2021.01.26 |
[CodeUp] 1405 : 숫자 로테이션 (0) | 2021.01.26 |
[CodeUp] 100제 - 1063 ~1077 (0) | 2021.01.25 |
댓글