@
choury #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
int n;
int a[111];
long long get(const int &a)
{
long long ret = 1;
while(ret < a){
ret *= 10;
}
return ret;
}
bool cmp(const int &a, const int &b)
{
return (long long)a*get(b)+b > (long long)b*get(a)+a;
}
void solve()
{
for(int i = 0; i < n; i++){
scanf("%d",&a[i]);
}
sort(a,a+n,cmp);
for(int i = 0;i < n; i++){
printf("%d",a[i]);
}
puts("");
}
int main()
{
#ifdef ARTHUR_YANG
freopen("in.txt", "r", stdin);
#endif // ARTHUR_YANG
while(~scanf("%d",&n)) {
solve();
}
return 0;
}
搞得不好也不用这么打击人吧……