Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
inputs="$(<$1)"
while read i
do
inputs="`echo "$inputs" | sed 1d`"
while read x
do
sum=$(($x + $i))
if [ $sum -eq 2020 ]
then
echo $(($x *$i))
fi
done <<< $inputs
done <<< $inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment