fn read_vec() -> Vec { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() } macro_rules! vecshare { ($x:ident, $v:expr, $idx:expr) => { let $x = $v[$idx-1].clone(); }; ( $v:expr; $($x:ident),* ) => { let mut idx = 0; $( idx += 1; vecshare!($x, $v, idx); )* } } fn main() { let ab:Vec = read_vec(); vecshare!(ab; a, b); let max_price = a + b * 5; for i in 1..=max_price { if i % 5 <= a { println!("{}", i); } } }