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 a97b1e1

Browse files
solve: 구슬을 나누는 경우의 수
1 parent 49e833d commit a97b1e1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

‎Level0/PRO120840.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Solution 1
2+
const factorial = (num) => {
3+
return num === 0 ? 1 : num * factorial(num - 1);
4+
};
5+
6+
const solution = (balls, share) => {
7+
return Math.round(factorial(balls) / (factorial(balls - share) * factorial(share)));
8+
};

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,4 @@
291291
| 23.11.21. | `Level 0` | [1로 만들기](https://school.programmers.co.kr/learn/courses/30/lessons/181880) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181880.js) |
292292
| 23.11.21. | `Level 0` | [문자열 묶기](https://school.programmers.co.kr/learn/courses/30/lessons/181855) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181855.js) |
293293
| 23.11.22. | `Level 0` | [더 크게 합치기](https://school.programmers.co.kr/learn/courses/30/lessons/181939) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181939.js) |
294+
| 23.11.23. | `Level 0` | [구슬을 나누는 경우의 수](https://school.programmers.co.kr/learn/courses/30/lessons/120840) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO120840.js) |

0 commit comments

Comments
(0)

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