aboutsummaryrefslogtreecommitdiff
path: root/2020/01b.hs
blob: 17d6e02d8b7d9cbb07f28821ec8588aa0eba5078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Day1B where

import System.Environment (getArgs)

main :: IO ()
main = do
    args <- getArgs;
    c <- readFile $ head args;
    let ns = map read $ lines c;

    print $ head [a * b * c| a <- ns, b <- ns, c <- ns, a + b + c == 2020];

    return ();