• + 3 comments

    Elixir Template A) Use when there isn't a special first line

    defmodule Solution do
      def main() do 
        IO.read(:stdio, :all)
          |> String.split # lines
          |> Enum.map(&String.to_integer(&1)) # integers
          |> Enum.reverse() # reversed integers
          # remember IO.inspect's default limit is 50!
          |> Enum.each(&IO.inspect(&1, limit: :infinity))
      end
    end
    
    Solution.main()
    

    Elixir Template B) Use when there is a special first line

    defmodule Solution do
      def main() do 
        lines = IO.read(:stdio, :all)
          |> String.split
          
        [first_line | rest_lines] = lines
        
        delimiter = String.to_integer(first_line)
        items = Enum.map(rest_lines, &String.to_integer(&1))
    
        items
          |> Enum.filter(&(&1 < delimiter))
          |> Enum.each(&IO.puts(&1))
      end
    end
    
    Solution.main()
    

    Solutions at https://youtube.com/landonwilkinscolor

    • + 1 comment

      I'm satisfied that you simply shared this useful information with us. Please stay us informed like this.

      Cabs in Zirakpur
      • + 0 comments

        great https://www.princepackersandmovers.com/

    • + 0 comments

      Thank For Your Solution on funtional Programming. It will Definetly Help me to Understand Funtional Programing and Its Software Training. Keep sharing Solution Like this

    • + 0 comments

      I think this is one of the best blog for me because this is really helpful for me. Thanks for sharing this valuable information for free... packers and movers in dhanbad