#![allow(unused)] use proconio::*; use std::collections::*; fn main() { input! { n: usize, mut a: [usize; n] } let modulo = 998244353; a.sort(); let mut x = 0; for i in 0..n { x *= 10; x += a[i]; x %= modulo; } println!("{x}") }