day 1, add edge case for last block
This commit is contained in:
parent
8554b324d4
commit
74439923dd
|
@ -2,3 +2,4 @@
|
||||||
# awk -f part1.awk < input | sort -n | tail -n 3 | sum0
|
# awk -f part1.awk < input | sort -n | tail -n 3 | sum0
|
||||||
NF == 0 { print a; a = 0 }
|
NF == 0 { print a; a = 0 }
|
||||||
{ a+=$1 }
|
{ a+=$1 }
|
||||||
|
END { print a; }
|
||||||
|
|
Loading…
Reference in New Issue