summary refs log tree commit diff homepage
path: root/2020/day01-1.sh
blob: 030d5239bdf3f5bbd835efdb0af9710152f32ea7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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