#include using namespace std; using ll=long long; void mpl(ll& x,ll y){ x+=y; if(x>998244353) x-=998244353; } int digit(ll x){ int ret=0; while(x) x/=10,ret++; return ret; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin>>n; vector a(n); for(int i=0;i>a[i]; sort(a.begin(),a.end(),[](ll x,ll y)->bool{ __int128_t X=x,Y=y; int dx=digit(x),dy=digit(y); for(int i=0;i