aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2019/puzzle-1.py24
-rw-r--r--2022/puzzle-8.lisp2
2 files changed, 1 insertions, 25 deletions
diff --git a/2019/puzzle-1.py b/2019/puzzle-1.py
deleted file mode 100644
index a6fffbd..0000000
--- a/2019/puzzle-1.py
+++ /dev/null
@@ -1,24 +0,0 @@
-from math import floor
-
-def fuel(mass):
- return (floor(mass / 3)) - 2
-
-def read_input():
- with open("1-input", "r") as fp:
- return [int(line) for line in fp.readlines()]
-
-def round_1():
- print(f"round 1: {sum([fuel(mass) for mass in read_input()])}")
-
-def recursive_fuel(mass):
- new_fuel = (floor(mass / 3)) - 2
- if new_fuel <= 0:
- return 0
- return new_fuel + recursive_fuel(new_fuel)
-
-def round_2():
- print(f"round 2: {sum([recursive_fuel(mass) for mass in read_input()])}")
-
-if __name__ == '__main__':
- round_1()
- round_2()
diff --git a/2022/puzzle-8.lisp b/2022/puzzle-8.lisp
index 54aca27..3ba8831 100644
--- a/2022/puzzle-8.lisp
+++ b/2022/puzzle-8.lisp
@@ -33,7 +33,7 @@
(col (get-column x))
(col-top (subseq col 0 y))
(col-bottom (subseq col (+ y 1))))
- (some #'id
+ (some #'identity
(mapcar (lambda (x) (every lt-tree? x))
(list row-left row-right col-top col-bottom))))))