Skip to content

Commit 5c3ac65

Browse files
committed
[level 1] Title: 음양 더하기, Time: 0.06 ms, Memory: 82.2 MB -BaekjoonHub
1 parent aed0505 commit 5c3ac65

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

프로그래머스/1/76501. 음양 더하기/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [level 1] 음양 더하기 - 76501
22

3-
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/76501)
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/76501?language=java)
44

55
### 성능 요약
66

7-
메모리: 10.1 MB, 시간: 0.09 ms
7+
메모리: 82.2 MB, 시간: 0.06 ms
88

99
### 구분
1010

@@ -16,7 +16,7 @@
1616

1717
### 제출 일자
1818

19-
2024년 06월 25일 10:00:22
19+
2026년 06월 25일 21:41:52
2020

2121
### 문제 설명
2222

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution {
2+
public int solution(int[] absolutes, boolean[] signs) {
3+
int ans = 0;
4+
5+
for (int i = 0; i < signs.length; i++) {
6+
if (!signs[i]) ans -= absolutes[i];
7+
else ans += absolutes[i];
8+
}
9+
return ans;
10+
}
11+
}

0 commit comments

Comments
 (0)