const handler = (a1, a2, n) => { const result = []; for (let i = 0; i < n; i++) { for (let j = 0; j < a2.length; j++) { result.push(a1[i] + a2[j]); } } result.sort(); return result.slice(0, n).reduce((t, i) => t + i, 0); };
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务