Largest int from concatenated ints: Difference between revisions

Content added Content deleted
(Added PicoLisp)
Line 699: Line 699:
Largest integer= 998764543431
Largest integer= 998764543431
</pre>
</pre>

=={{header|Prolog}}==
Works with SWI-Prolog 6.5.3. Try all permutations method.
<lang Prolog>largest_int(In, Out) :-
maplist(name, In, LC),
aggregate(max(V), get_int(LC, V), Out).


get_int(LC, V) :-
permutation(LC, P),
append(P, LV),
name(V, LV).
</lang>


=={{header|Python}}==
=={{header|Python}}==