added task 2
This commit is contained in:
parent
9b1982b054
commit
84f53c9bf0
@ -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
|
||||
```
|
||||
|
||||
|
@ -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}
|
Loading…
Reference in New Issue
Block a user