Skip to content

Commit

Permalink
Day 1, part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
zetter committed Dec 10, 2022
0 parents commit 4ae880f
Show file tree
Hide file tree
Showing 4 changed files with 2,282 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist-newstyle
6 changes: 6 additions & 0 deletions day_1/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Data.List.Split (splitOn)

main = do
contents <- readFile "data.txt"
let groups = map (map read . lines) (splitOn "\n\n" contents)
print (maximum (map sum groups))
Loading

0 comments on commit 4ae880f

Please sign in to comment.