File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
백준/Bronze/5597. 과제 안 내신 분..? Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ # [ Bronze III] 과제 안 내신 분..? - 5597
2+
3+ [ 문제 링크] ( https://www.acmicpc.net/problem/5597 )
4+
5+ ### 성능 요약
6+
7+ 메모리: 11468 KB, 시간: 64 ms
8+
9+ ### 분류
10+
11+ 구현
12+
13+ ### 제출 일자
14+
15+ 2025년 7월 29일 10:47:42
16+
17+ ### 문제 설명
18+
19+ <p >X대학 M교수님은 프로그래밍 수업을 맡고 있다. 교실엔 학생이 30명이 있는데, 학생 명부엔 각 학생별로 1번부터 30번까지 출석번호가 붙어 있다.</p >
20+
21+ <p >교수님이 내준 특별과제를 28명이 제출했는데, 그 중에서 제출 안 한 학생 2명의 출석번호를 구하는 프로그램을 작성하시오.</p >
22+
23+ ### 입력
24+
25+ <p >입력은 총 28줄로 각 제출자(학생)의 출석번호 n(1 ≤ n ≤ 30)가 한 줄에 하나씩 주어진다. 출석번호에 중복은 없다.</p >
26+
27+ ### 출력
28+
29+ <p >출력은 2줄이다. 1번째 줄엔 제출하지 않은 학생의 출석번호 중 가장 작은 것을 출력하고, 2번째 줄에선 그 다음 출석번호를 출력한다.</p >
30+
Original file line number Diff line number Diff line change 1+ import java .io .*;
2+ class Main {
3+ public static void main (String [] args ) throws Exception {
4+ boolean [] v = new boolean [31 ];
5+
6+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
7+ for (int i =0 ; i <28 ; i ++){
8+ int n = Integer .parseInt (br .readLine ());
9+ v [n ] = true ;
10+ }
11+ for (int i =1 ; i <31 ; i ++){
12+ if (!v [i ]){
13+ System .out .println (i );
14+ }
15+ }
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments