Created
May 27, 2015 17:33
-
-
Save erukiti/0e56ea32b8c495173271 to your computer and use it in GitHub Desktop.
問題4 正しいバージョン (でも答え見ちゃった…)
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
#! /usr/bin/env coffee | |
p4 = (lists) -> | |
lists.sort((a, b) -> (b.toString() + a.toString()) - (a.toString() + b.toString())).map((n) -> n.toString()).join('') | |
console.log(p4([50, 2, 1, 9])) | |
console.log(p4([50, 2, 1, 5, 56])) | |
console.log(p4([42, 423, 420])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment