Largest int from concatenated ints: Difference between revisions

m
(→‎{{header|C}}: replaced with simpler code with total length limitation)
Line 72:
import Data.Ord (comparing)
 
main = print (map maxcat [[1,34,3,98,9,76,45,4], [54,546,548,60]] :: [IntInteger])
where sorted = sortBy (flip $ comparing $ cycle . show)
maxcat = read . concat . map showsorted . sortedmap show</lang>
 
{{out}}
Anonymous user