월간 코드 챌린지 시즌2
https://programmers.co.kr/learn/courses/30/lessons/76501
def solution(absolutes, signs):
result = 0
idx = len(absolutes)
for i in range(0, idx) :
if signs[i] :
result += absolutes[i]
else :
result -= absolutes[i]
return result
function solution(absolutes, signs) {
let result = 0;
absolutes.forEach((v,i) => {
signs[i] ? result += v : result -= v;
})
return result;
}