aboutsummaryrefslogtreecommitdiff
path: root/2016/03/puzzle-1.awk
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-12-05 17:34:48 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-12-05 17:34:48 +0100
commit04197d46e899873af5478b4d5ccaf1579fe0b6f8 (patch)
tree4cdd1a555cb4d7f92e62b254c71bcc615b1a044b /2016/03/puzzle-1.awk
parent5da8c3550eada8ec36b53d87e557cbc113a23faa (diff)
Add 2016 day 3 solutions
Diffstat (limited to '2016/03/puzzle-1.awk')
-rwxr-xr-x2016/03/puzzle-1.awk4
1 files changed, 4 insertions, 0 deletions
diff --git a/2016/03/puzzle-1.awk b/2016/03/puzzle-1.awk
new file mode 100755
index 0000000..809f12c
--- /dev/null
+++ b/2016/03/puzzle-1.awk
@@ -0,0 +1,4 @@
+#!/usr/bin/awk -f
+
+($1 + $2 > $3) && ($2 + $3 > $1) && ($3 + $1 > $2) { c++ }
+END { print c }