day 04
This commit is contained in:
parent
c667a1047c
commit
b612422503
6 changed files with 771 additions and 14 deletions
|
|
@ -10,8 +10,8 @@ main = do
|
|||
raw <- getContents
|
||||
let ls = map toBits $ lines raw
|
||||
in do
|
||||
putStrLn $ "day2a: " ++ (show (solveA ls))
|
||||
putStrLn $ "day2b: " ++ (show (solveB ls))
|
||||
putStrLn $ "day3a: " ++ (show (solveA ls))
|
||||
putStrLn $ "day3b: " ++ (show (solveB ls))
|
||||
|
||||
toBits :: String -> Bits
|
||||
toBits = map (\c -> if c == '0' then 0 else 1)
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
00100
|
||||
11110
|
||||
10110
|
||||
10111
|
||||
10101
|
||||
01111
|
||||
00111
|
||||
11100
|
||||
10000
|
||||
11001
|
||||
00010
|
||||
01010
|
||||
Loading…
Add table
Add a link
Reference in a new issue