initial commit
This commit is contained in:
commit
ba1762a7e9
6
1/README.md
Normal file
6
1/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Day 1
|
||||
Get maximum number of calories an Elf carries
|
||||
```shell
|
||||
awk -f day1.awk input.txt
|
||||
```
|
||||
|
1
1/day1.awk
Executable file
1
1/day1.awk
Executable file
@ -0,0 +1 @@
|
||||
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}
|
2248
1/input.txt
Normal file
2248
1/input.txt
Normal file
File diff suppressed because it is too large
Load Diff
1
1/testfile
Normal file
1
1/testfile
Normal file
@ -0,0 +1 @@
|
||||
67027
|
Loading…
Reference in New Issue
Block a user