#pragma region template #include using namespace std; #include using namespace atcoder; using mint=modint998244353; templateinline bool chmax(T &a,T b){if(ainline bool chmin(T &a,T b){if(a>b){a=b;return true;}return false;} #define rep1(i,a) for(int i=0;i<(int)(a);i++) #define rep2(i,a,b) for(int i =(int)(a);i<(int)(b);i++) #define rep3(i,a,b,c) for(int i=(int)(a);i<(int)(b);i+=(int)(c)) #define overloadRep(a,b,c,d,e,...)e #define rep(...) overloadRep(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__) #define rrep(i,a,b) for(int i=(int)(a);i<=(int)(b);i++) #define drep(i,a,b) for(int i=(int)(a);i>=(int)(b);i--) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define spa " " #define yes "Yes" #define no "No" #define int long long const int inf=8e18; const int dx[4]={0,1,0,-1}; const int dy[4]={1,0,-1,0}; using P=pair; using T=tuple; bool bit(int &x,int &p){return (x>>p)&1;} #pragma endregion signed main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout<>n; vectora(n);rep(i,n)cin>>a[i]; sort(all(a)); mint ans; rep(i,n){ans*=10;ans+=a[i];} cout<