iOS 개발 공부

[Swift] 내적 본문

프로그래머스/Lv.1

[Swift] 내적

물복딱복준복 2023. 2. 12. 00:09
import Foundation

func solution(_ a:[Int], _ b:[Int]) -> Int {
    return zip(a, b).map{ $0 * $1 }.reduce(0, +)
}