백준55971 [브론즈3][Swift]백준5597(배열) https://www.acmicpc.net/problem/5597 답안코드var students = Array(repeating: false, count: 31)for _ in 1...28 { if let input = readLine(), let number = Int(input) { students[number] = true }}for i in 1...30 { if !students[i] { print(i) }}31개의 false 값을 가진 배열을 생성합니다 (0번 인덱스는 사용하지 않음).28번 반복하면서 입력받은 번호에 해당하는 인덱스를 true로 변경합니다.1부터 30까지 순회하면서 false인 인덱스(즉, 제출하지 않은 학생의 번호)를 출력합니다... 2024. 10. 7. 이전 1 다음