Anonymous user
Largest int from concatenated ints: Difference between revisions
Largest int from concatenated ints (view source)
Revision as of 03:51, 22 October 2013
, 10 years ago→{{header|NetRexx}}
(→{{header|Perl 6}}: prefer string comparison, which won't fail on leading zeros, if there were any, which there aren't) |
|||
Line 495:
loop il over ints
say largestInt(il).right(20) ':' il.space(1, ',')
return
</lang>
Line 503:
6054854654 : 54,546,548,60
</pre>
=={{header|OCaml}}==
<lang ocaml>let myCompare a b = compare (b ^ a) (a ^ b)
|