![](http://i1.daumcdn.net/thumb/C148x148.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bbhITb/btsINVI0E3X/zsiNAFiU4PiY4FgeSq61w0/img.png)
https://school.programmers.co.kr/learn/courses/30/lessons/132267 테스트 케이스는 통과하는데 제출시 우르르 실패로 떠서 뭐지(?) 싶었다.그런데 역시 내가 문제였고.. 문제를 잘 읽어봤어야 했다.. 처음 제출했던 답은 아래와 같다func solution(_ a:Int, _ b:Int, _ n:Int) -> Int { var currentCola: Int = n var result: Int = 0 while currentCola >= a { currentCola -= a result += 1 // 빈병을 반납하면 콜라 한병을 받는거로 구했음 currentCola += b } re..
알고리즘
2024. 7. 26. 14:59
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Swift 프로그래머스
- swift reduce
- Swift
- Swift Error Handling
- Combine: Asynchronous Programming with Swift
- swift programmers
- swift protocol
- ios
- Class
- Swift Leetcode
- Swift inout
- 2023년 회고
- removeLast()
- swift property
- 원티드 프리온보딩
- Swift 내림차순
- Swift joined
- Swift 프로퍼티
- Swift ModernRIBs
- RIBs tutorial
- iOS error
- swift 고차함수
- RTCCameraVideoCapturer
- Swift init
- swift (programmers)
- Swift RIBs
- Swift joined()
- CS 네트워크
- Swift final
- Swift 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함