aoc2019/day-1/part-1/main.sh
2019-12-02 14:42:57 +01:00

11 lines
166 B
Bash
Executable file

#!/usr/bin/env bash
cd "$(dirname "$0")";
output=0;
while read nr; do
a=$((nr / 3));
a=$((a - 2));
output=$((a + output));
done < ./input
echo $output;