using System; public class Hello { public static int MOD = 998244353; static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, long.Parse); getAns(n, a); } static void getAns(int n, long[] a) { Array.Sort(a); var x = 0L; foreach (var z in a) { x = x * 10 + z; x %= MOD; } Console.WriteLine(x); } }