EOF1 [Swift] 백준에서 readLine() 메서드로 입력 받기 백준에서 Swift 언어로 문제를 풀 때, 입력을 어떻게 받아야 할까? Swift의 표준 입력 함수 readLine()에 대해 알아보자. 주어진 조건(띄어쓰기 여부 등)에 따라 입력 받은 문자열을 어떠한 자료형으로 변환할지 알아 보자. 📌 요약 이후 설명은 아래의 개발자 공식 문서에서 직접 번역했다. readline(strippingNewline:) | Apple Developer Documentation readLine(strippingNewline:) Returns a string read from standard input through the end of the current line or until EOF is reached. 현재의 줄 끝까지 또는 EOF와 마주할 때까지 표준 입력으로부터 문자.. 2023. 3. 16. 이전 1 다음 반응형