We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aed0505 commit 5c3ac65Copy full SHA for 5c3ac65
2 files changed
프로그래머스/1/76501. 음양 더하기/README.md
@@ -1,10 +1,10 @@
1
# [level 1] 음양 더하기 - 76501
2
3
-[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/76501)
+[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/76501?language=java)
4
5
### 성능 요약
6
7
-메모리: 10.1 MB, 시간: 0.09 ms
+메모리: 82.2 MB, 시간: 0.06 ms
8
9
### 구분
10
@@ -16,7 +16,7 @@
16
17
### 제출 일자
18
19
-2024년 06월 25일 10:00:22
+2026년 06월 25일 21:41:52
20
21
### 문제 설명
22
프로그래머스/1/76501. 음양 더하기/음양 더하기.java
@@ -0,0 +1,11 @@
+class Solution {
+ public int solution(int[] absolutes, boolean[] signs) {
+ int ans = 0;
+
+ for (int i = 0; i < signs.length; i++) {
+ if (!signs[i]) ans -= absolutes[i];
+ else ans += absolutes[i];
+ }
+ return ans;
11
+}
0 commit comments