class Solution { fun solution(a: IntArray, b: IntArray): Int = a.foldIndexed(0) {idx, total, num -> total + (num * b[idx])} }