Skip to content

Commit 5827417

Browse files
Merge pull request #110 from cg10036/12929
Level4 - 올바른 괄호의 갯수
2 parents 688bcfc + ebc1241 commit 5827417

File tree

1 file changed

+7
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)