File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,17 @@ defmodule Mix.Tasks.Day1 do
78
78
use Mix.Task
79
79
80
80
def run ( _args ) do
81
- { :ok , input } = File . read ( "inputs/day1.txt" )
81
+ { :ok , input } = File . read ( "../ inputs/day1.txt" )
82
82
frequencies = input
83
83
|> String . split
84
84
|> Enum . map ( & String . to_integer / 1 )
85
85
86
- # final_frequency = frequencies |> Enum.sum
87
- # IO.puts("Hey Commander! I gave my best and according to my calculatiosn the the final frequency is #{final_frequency}!")
86
+ final_frequency = frequencies |> Enum . sum
87
+ IO . puts ( "Hey Commander! I gave my best and according to my calculatiosn the the final frequency is #{ final_frequency } !" )
88
88
89
+ IO . puts ( "This will take a while.." )
90
+ repeated_frequency = detect_repeated_frequency ( frequencies )
91
+ IO . puts ( "Hey Chief. Try `#{ repeated_frequency } ` for the second part." )
89
92
end
90
93
91
94
File renamed without changes.
You can’t perform that action at this time.
0 commit comments