diff options
author | June McEnroe <june@causal.agency> | 2020-12-01 00:15:05 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-01 00:15:05 -0500 |
commit | 6036beda8ceae3eb9d2906b2096c7b7c6a1d03ec (patch) | |
tree | fdd76453ad7dd9d492a2d2166d437332c0b42522 | |
parent | Solve day 10 part 2 (diff) | |
download | aoc-6036beda8ceae3eb9d2906b2096c7b7c6a1d03ec.tar.gz aoc-6036beda8ceae3eb9d2906b2096c7b7c6a1d03ec.zip |
Solve day 1 part 1
-rw-r--r-- | 2020/day01-1.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/2020/day01-1.sh b/2020/day01-1.sh new file mode 100644 index 0000000..030d523 --- /dev/null +++ b/2020/day01-1.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu +entries=$(cat) +for i in $entries; do + for j in $entries; do + if [ $((i+j)) -eq 2020 ]; then + echo $((i*j)) + exit + fi + done +done |