defmodule Main do def main do [a,b] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer(&1)) Enum.map(a..b, fn num -> nabeatu(num) end) end def nabeatu(num) do cond do rem(num, 3) == 0 -> IO.puts num num |> Integer.to_string |> String.contains?("3") -> IO.puts num true -> nil end end end