diff --git a/day4/first.hs b/day4/first.hs index 3ccea49..58fb772 100644 --- a/day4/first.hs +++ b/day4/first.hs @@ -40,8 +40,7 @@ finalSum = aux 0 mark :: Integer -> Board -> Board mark n = map $ map conditionalMark where conditionalMark x - | n == 0 && x == 0 = -100 - | x == n = -x + | x == n = -1 | otherwise = x simulate :: Integer -> [Integer] -> [Board] -> Integer diff --git a/day4/second.hs b/day4/second.hs index 31d812a..06d7960 100644 --- a/day4/second.hs +++ b/day4/second.hs @@ -45,8 +45,7 @@ finalSum = aux 0 mark :: Integer -> Board -> Board mark n = map $ map conditionalMark where conditionalMark x - | n == 0 && x == 0 = -100 - | x == n = -x + | x == n = -1 | otherwise = x simulate :: Integer -> [Integer] -> [Board] -> Integer