[Swift] 프로그래머스150368 이모티콘 할인행사
·
📝 코테/프로그래머스
import Foundation func solution(_ users:[[Int]], _ emoticons:[Int]) -> [Int] { var answer = [0, 0] func getAnswer(_ current: [Int]) { if current.count > emoticons.count { return } stride(from: 10, through: 40, by: 10).forEach { getAnswer(current + [$0]) } if current.count < emoticons.count { return } var result = [0, 0] users.forEach { user in var userInfo = [0, 0] for i in current.indices { if ..
JerryiOS
'완전탐색' 태그의 글 목록