diff options
Diffstat (limited to '2022')
-rw-r--r-- | 2022/day01.awk | 10 |
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; +} |