Skip to content

Instantly share code, notes, and snippets.

View krlosmederos's full-sized avatar
🏡
Work from home

Carlos René Mederos Arias krlosmederos

🏡
Work from home
View GitHub Profile
@ck3g
ck3g / example.ex
Created February 14, 2019 16:14
How to read from STDIN in Elixir (for HackerRank)
defmodule Solution do
#Enter your code here. Read input from STDIN. Print output to STDOUT
end
array_length = IO.read(:stdio, :line)
array = IO.read(:stdio, :line)
array_length
|> String.trim
|> String.to_integer