day 16, exercise 2 (bash version)

This commit is contained in:
2021-01-11 17:27:26 +01:00
parent ccfbf5322a
commit aff61f5e5c
4 changed files with 103 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ while read -r line; do
elif [[ $line != "" ]]; then
if ((state == 2)); then
for i in ${line//,/ }; do
# shellcheck disable=SC2100
[[ ! -v valid[$i] ]] && res=res+i
done
fi