Browse Source

Day 2

master
William Davis 9 months ago
parent
commit
39ec424005
  1. 1000
      02/data
  2. 7
      02/main.awk

1000
02/data

File diff suppressed because it is too large Load Diff

7
02/main.awk

@ -0,0 +1,7 @@
/forward/ { x += $2; y += $2 * aim }
/up/ { aim -= $2 }
/down/ { aim += $2 }
END { print x * aim "\n" x * y }
# 1561344
# 1848454425
Loading…
Cancel
Save