fn main(){ let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let vec: Vec<&str> = s.trim().split(' ').collect(); let a: i32 = vec[0].parse().unwrap(); let b: i32 = vec[1].parse().unwrap(); for i in a as usize..b as usize + 1 { if i % 3 == 0 || fb(i) { println!("{}", i); } } } fn fb(i: usize) -> bool{ let mut t = i as i32; loop{ if t % 10 == 3 { return true; } t /= 10; if t == 0 { return false; } } }