var
n,i,x,j:longint;
s:array[0..20]of string;
begin
readln(n);
for i:=1 to n do//因为数据之间有空格,所以先读入成数字,再变为字符串
begin
read(x);
str(x,s[i]);
end;
for i:=1 to n-1 do//要用选排
begin
for j:=i+1 to n do
begin
if s[i]+s[j]<s[j]+s[i] then//选排会将所有情况一一模拟,继而找出最大数
begin
s[0]:=s[i];
s[i]:=s[j];
s[j]:=s[0];
end;
end;
end;
for i:=1 to n do//排完序后,输出就可以了
write(s[i]);
end.
转载请注明原文地址: https://ju.6miu.com/read-1000152.html