diff --git a/1/README.md b/1/README.md index 0161a4c..f21b36c 100644 --- a/1/README.md +++ b/1/README.md @@ -1,6 +1,8 @@ # Day 1 -Get maximum number of calories an Elf carries ```shell -awk -f day1.awk input.txt +# Find the Elf carrying the most Calories. How many total Calories is that Elf carrying? +awk -f day1-1.awk input.txt +# Find the top three Elves carrying the most Calories. How many Calories are those Elves carrying in total? +./day1.2.sh ``` diff --git a/1/day1.awk b/1/day1.awk deleted file mode 100755 index 7c763d4..0000000 --- a/1/day1.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN{sum=0; max_sum=0} {if (NF != 0) {sum+=$1} else {if (sum > max_sum) {max_sum=sum}; sum=0}} END{print max_sum}