#include<iostream>#include<cstring>#include<algorithm>usingnamespace std;constint N =10010;
string a[N];boolcmp(string a, string b){return a + b < b + a;}
string ans;intmain(){int n;
cin >> n;for(int i =1; i <= n; i++)
cin >> a[i];sort(a +1, a + n +1, cmp);for(int i =1; i <= n; i++){
ans += a[i];}int flag =0, count =0;for(int i =0; ans[i]; i++){if(ans[i]=='0'&& flag ==0){continue;}else{
count++;
cout << ans[i];
flag++;}}if(count ==0)
cout <<0;}
solution#include <iostream>#include <cstring>#include <algorithm>using namespace std;const int N = 10010;string a[N];bool cmp(string a, string b){ return a + b < b + a;}string ans;int main(){ int n; cin >>