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 15a9754

Browse files
authored
Create 올바른-괄호의-갯수&12929&.js
1 parent 7b21a65 commit 15a9754

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//https://github.com/codeisneverodd/programmers-coding-test
2+
//완벽한 정답이 아닙니다.
3+
//정답 1 - cg10036
4+
function fact(n) {
5+
return n ? BigInt(n) * fact(n - 1) : 1n;
6+
}
7+
8+
function solution(n) {
9+
return fact(n * 2) / (fact(n) * fact(n + 1));
10+
}

0 commit comments

Comments
(0)

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