From fbeaf4fde52ebb89f07564685454cfc385dddb0d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 1 Dec 2022 21:26:32 +0100 Subject: Ignore some files --- 2015/02/puzzle-2.awk | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 2015/02/puzzle-2.awk (limited to '2015/02/puzzle-2.awk') diff --git a/2015/02/puzzle-2.awk b/2015/02/puzzle-2.awk deleted file mode 100755 index 450aed9..0000000 --- a/2015/02/puzzle-2.awk +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/awk -f - -function min(a, b, c) { - if (a <= b && a <= c) - return a - if (b <= a && b <= c) - return b - return c -} - -BEGIN { FS = "x" } -{ - x = $1 + $1 + $2 + $2 - y = $2 + $2 + $3 + $3 - z = $1 + $1 + $3 + $3 - - sum += $1 * $2 * $3 + min(x, y, z) - # END PART 2 -} -END { print sum } -- cgit v1.2.3