fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let mut v: Vec = s.split_whitespace().flat_map(str::parse).collect(); if v[1] < 100 * v[0] { println!("can't exchange"); return; } let d = [10000, 5000, 2000, 1000, 500, 100]; let c: Vec<_> = d.iter().map(|d| (v[1] / d, v[1] %= d).0).collect(); if c[5] >= v[0] { println!("no exchange"); return; } println!("{}", (v[0] - c[5] + 4) / 5 * 5 + c[5]); }