aboutsummaryrefslogtreecommitdiff
path: root/2019/05/puzzles.lisp
blob: 7602231bea005197c24108472163d77ab15cd9a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/sbcl --script

(load "../interpreter.lisp")

(defun main (filename)
  (let (result)
    (intcode:run (intcode:parse filename)
                 (lambda () (if (= +puzzle-part+ 1) 1 5))
                 (lambda (x) (setq result x)))
    result))

(format t "~d~%" (main "input"))