[C++] 백준 5587 : 과제 안 내신 분..?

Kim Nahyeong·2022년 3월 13일
0

백준

목록 보기
103/157

#include <iostream>

int student[31] = {0};
int n;
int main(int argc, char** argv){
  for(int i = 0; i < 28; i++){
    scanf("%d", &n);
    student[n]++;
  }

  for(int i = 1; i <31; i++){
    if(student[i] == 0){
      printf("%d\n", i);
    }
  }

  return 0;
}

오늘의 몸풀기 문제.
정말 정석 중 정석 문제로 생각하면 될 것 같다.

0개의 댓글