Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3adbbe4

Browse files
solve: 컨트롤 제트
1 parent 11a2292 commit 3adbbe4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎Level0/PRO120853.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Solution 1
2+
function solution(s) {
3+
const numList = s.split(' ');
4+
5+
return numList.reduce(
6+
(acc, cur, index) => (cur === 'Z' ? acc - numList[index - 1] : acc + Number(cur)),
7+
0
8+
);
9+
}

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,4 @@
311311
| 23.12.23. | `Level 0` | [수열과 구간 쿼리1](https://school.programmers.co.kr/learn/courses/30/lessons/181883) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181883.js) |
312312
| 23.12.25. | `Level 0` | [주사위 게임 1](https://school.programmers.co.kr/learn/courses/30/lessons/181839) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181839.js) |
313313
| 23.12.26. | `Level 0` | [특별한 이차원 배열 1](https://school.programmers.co.kr/learn/courses/30/lessons/181833) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181833.js) |
314+
| 23.12.27. | `Level 0` | [컨트롤 제트](https://school.programmers.co.kr/learn/courses/30/lessons/120853) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO120853.js) |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /