public int solution(int[] absolutes, boolean[] signs) {
int answer = 0;
for (int i = 0; i < signs.length; i++) {
int value = signs[i] ? absolutes[i] : -absolutes[i];
answer += value;
}
return answer;
}
출처:https://school.programmers.co.kr/learn/courses/30/lessons/76501