Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- noncopyable
- 구조체
- 안드로이드
- weak
- ios
- 프로그래머스
- 연산자
- async
- View
- 해시
- 생명주기
- 프래그먼트
- Self
- 풀이
- 리스트뷰
- 이스케이핑
- 클로저
- RxSwift
- concurrency
- 알고리즘
- Swift
- 스위프트
- Subject
- observable
- 자바
- 차이
- 옵셔널
- 백준
- 프로퍼티
- rx
Archives
- Today
- Total
목록알고리즘/스위프트 알고리즘 (3)
study record
백준 2740 - 스위프트 풀이
import Foundation func BJ2740(){ var arrSizes = readLine()!.split(separator: " ").map{ Int($0)! } var arrA: [[Int]] = Array(repeating: Array(repeating: 0, count: arrSizes[1]), count: arrSizes[0]) for i in 0..
알고리즘/스위프트 알고리즘
2022. 2. 6. 12:58
백준 1292 - 스위프트 풀이
import Foundation func BJ1292(){ let nums = readLine()!.split(separator: " ").map{ Int($0)} var arr: [Int] = [] var count = 1 var n = 1 for _ in 1...1000 { arr.append(n) if count < n { count += 1 }else{ n += 1 count = 1 } } var sum = 0 for i in nums[0]!...nums[1]! { sum += arr[i-1] } print(sum) } func BJ1292plus(){ // 더 깔끔한 풀이 var arr: [Int] = [] for i in 1..
알고리즘/스위프트 알고리즘
2022. 2. 4. 15:54