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 f7b30ee

Browse files
Add 정수-내림차순으로-배치하기.js
1 parent 0ca90b3 commit f7b30ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎level-1/정수-내림차순으로-배치하기.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ function solution(n) {
2020
arrN.sort((a, b) => b - a);
2121
// 배열 -> 문자열 -> 정수
2222
return parseInt(arrN.join(""));
23+
}
24+
25+
//정답 3 - prove-ability
26+
function solution(n) {
27+
return parseInt(n.toString().split("").sort((a, b) => b - a).join(""), 10);
2328
}

0 commit comments

Comments
(0)

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