use itertools::Itertools; use proconio::input; use proconio::marker::Bytes; fn main() { input! { c : Bytes } let c = c.into_iter().map(|c| (c - b'0') as usize).collect_vec(); println!("{}", c.iter().max().unwrap() - c.iter().min().unwrap()); }