summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-12-01 14:16:11 -0500
committerJune McEnroe <june@causal.agency>2022-12-01 14:16:11 -0500
commit79c8f67a9e9f0ac208d7449b861e3cdec2180003 (patch)
tree97f9bf93c09e9f81ad9b368f5e9a297e7a9ba927
parentSolve day 14 part 2 (diff)
downloadaoc-79c8f67a9e9f0ac208d7449b861e3cdec2180003.tar.gz
aoc-79c8f67a9e9f0ac208d7449b861e3cdec2180003.zip
Solve day 1 part 1
-rw-r--r--2022/day01.awk10
1 files changed, 10 insertions, 0 deletions
diff --git a/2022/day01.awk b/2022/day01.awk
new file mode 100644
index 0000000..c81d624
--- /dev/null
+++ b/2022/day01.awk
@@ -0,0 +1,10 @@
+/[[:digit:]]+/ {
+	cals += $1;
+}
+/^$/ {
+	if (cals > max) max = cals;
+	cals = 0;
+}
+END {
+	print max;
+}
s where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe Apparently sometimes it didn't like receiving its own internal storage to parse again. Understandable. 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe Wow. One of the best I've read. 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe Broke out LDLIBS for each bin, and made everything more uniform. 2020-01-28Change scout sensitivity to 1.4June McEnroe idk it seems to work. 2020-01-28Import shows.txtJune McEnroe