adventofcode-2021/day00/part1.hs

8 lines
269 B
Haskell
Raw Normal View History

2021-11-29 11:34:50 +01:00
import System.IO (readFile)
import System.Environment (getArgs)
main :: IO ()
main = do [_, _, file] <- getArgs
(_:numbers) <- map (read :: String -> Int) . lines <$> readFile file
putStrLn $ show (minimum numbers) ++ " " ++ show (maximum numbers)