aboutsummaryrefslogtreecommitdiff
path: root/2020/01a.hs
blob: 1c72ecc38731b5cd432f80f92f6a03fb360c504c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Day1A 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 | a <- ns, b <- ns, a + b == 2020];

    return ();