initial commit
This commit is contained in:
commit
f4fa590833
7
Day00/Part1.hs
Normal file
7
Day00/Part1.hs
Normal file
@ -0,0 +1,7 @@
|
||||
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)
|
8
clean
Executable file
8
clean
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
day="$1"
|
||||
part="$2"
|
||||
|
||||
day="$(printf '%02d' "$day")"
|
||||
|
||||
rm -f ./run
|
||||
rm -f "Day${1}/Part${2}.hi" "Day${1}/Part${2}.o"
|
6
inputs/00-1.txt
Normal file
6
inputs/00-1.txt
Normal file
@ -0,0 +1,6 @@
|
||||
5
|
||||
10
|
||||
20
|
||||
5
|
||||
123
|
||||
0
|
Loading…
Reference in New Issue
Block a user