const handler = ([base, ...other]) => { const newArray = new Array(base[1]).fill(0); other.forEach(([x, y]) => { for (let i = x; i < newArray.length; i++) { newArray[i] += y; } }); return newArray.reduce((t, i) => t + Math.abs(i), 0); };
点赞 评论

相关推荐

牛客网
牛客企业服务