summaryrefslogtreecommitdiff
path: root/2020/day1
blob: 30e730e9e53e12e125b8b6041b7f93b677646d88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

set -- $(cat)

for a1; do
    for a2; do
        for a3; do
            [ $(( a1 + a2 + a3 )) -eq 2020 ] && break 3
        done
    done
done
echo $(( a1 * a2 * a3 ))