use std::io::{self, BufRead}; fn get_lines() -> Vec { let stdin = io::stdin(); let lines: Vec = stdin.lock().lines().map(|l| l.unwrap()).collect(); return lines; } fn is_nabeatsu(n :i32) -> bool { return n % 3 == 0 || n.to_string().chars().any(|x| x == '3'); } fn main(){ let s = &get_lines()[0]; let n: Vec = s.split(' ').map(|x| x.parse().unwrap()).collect(); let (a, b) = (n[0], n[1]); for i in a..b { if is_nabeatsu(i) { println!("{}", i); } } }