일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- String
- initalizer
- Swift
- Unicode
- property
- Foundation
- interpace
- 이니셜라이저
- UIKit
- instance
- Git
- struct
- init
- 스위프트
- url
- Method
- Xcode
- extension
- 코딩테스트
- Protocol
- delegate
- Terminal
- initializer
- tuist
- Class
- 디자인패턴
- enum
- optional
- IOS
- type
Archives
- Today
- Total
목록입출력 (1)
아리의 iOS 탐구생활

백준 코딩테스트 할때 거의 필수적으로 사용하는 입력과 출력을 정리해보았다. ✔️ Apple 공식문서 참고 Apple Developer Documentation developer.apple.com ✔️ 입력 받기 readLine() 문자열 입력받기 let str = readLine()! 정수 입력받기 let num = Int(readLine()!)! 공백이 있는 숫자를 배열로 입력받기 (1 2 3 4 5) let nums = readLine()!.split(separator: “ “).map{ Int($0) } // nums = [1, 2, 3, 4, 5] 공백없는 숫자를 배열로 입력받기 (12345) let nums = readLine()!.map{ Int(String($0))! } // nums = [..
Swift/자료구조
2021. 7. 30. 11:39