package main import "fmt" func main() { var A, B int fmt.Scan(&A, &B) for i := A; i <= B; i++ { if i%3 == 0 { fmt.Println(i) } else { for j := i; j > 0; j /= 10 { if j%10 == 3 { fmt.Println(i) break } } } } }