use proconio::{fastout, input}; #[fastout] fn main() { input! { n: u8, c: [u8; 9], } println!("{}", output(solve(n, c))) } fn solve(_n: u8, c: Vec) -> Vec { c.into_iter() .enumerate() .rev() .map(|(i, c)| [b'0' + (i + 1) as u8].repeat(c as usize)) .flatten() .collect() } fn output(ans: Vec) -> String { String::from_utf8(ans).unwrap() }