This commit is contained in:
2024-12-08 23:52:17 +08:00
parent cdd982a73c
commit ee587b234b
2 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,8 @@
#!/usr/bin/env awk
# Just pre-compute all possible results
# and check against the sum
BEGIN {
FS = "[: ]"
total = 0

View File

@ -13,10 +13,10 @@ do
LINE="$(
for (( i=0; i<${#MAP_ARRAY[@]}; i++ ))
do
if [[ ${MAP_ARRAY[i]} == "$CHAR" ]]
then
printf "%s " "$i"
fi
if [[ ${MAP_ARRAY[i]} == "$CHAR" ]]
then
printf "%s " "$i"
fi
done
)"
printf "%s\n" "$LINE" >&2