Created
May 3, 2020 09:35
-
-
Save DongguemYoo/b7736bfb27e992059f49eb958f9a1333 to your computer and use it in GitHub Desktop.
코딩테스트 연습 정수 내림차순으로 배치하기.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//검색 c# OrderByDescending사용법 | |
//c# iorderedenumerable<char> to string | |
public long solution(long n) | |
{ | |
long answer; | |
var t = n.ToString().OrderByDescending(x => x); | |
answer = long.Parse(new string(t.ToArray())); | |
return answer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment