Update sander/AoC 2025
parent
a2fe8b86ee
commit
35243b8b50
|
|
@ -20,7 +20,7 @@ main = do handle <- openFile "C:/Users/[your directory here]/d1.txt" ReadMode
|
|||
|
||||
-- Day 1: ...
|
||||
|
||||
-- Part One (not correct yet)
|
||||
-- Part One (correct)
|
||||
|
||||
doday1_1 :: String -> String
|
||||
doday1_1 input = show (countZeroRotations (words input) 50)
|
||||
|
|
@ -40,9 +40,10 @@ rotateDial (direction : r) pos
|
|||
|
||||
normalizeHundred :: Int -> Int
|
||||
normalizeHundred x
|
||||
| x >= 100 = x - 100
|
||||
| x < 0 = x + 100
|
||||
| True = x
|
||||
| x >= 0 && x < 100 = x
|
||||
| x >= 100 = normalizeHundred (x - 100)
|
||||
| x < 0 = normalizeHundred (x + 100)
|
||||
| True = x
|
||||
|
||||
-- Part Two
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue