Introduction
Introduction Statistics Contact Development Disclaimer Help
taoc2: remove extra braces - aoc22 - advent of code 2022 solutions
git clone git://src.adamsgaard.dk/aoc22
Log
Files
Refs
README
---
commit 6255129568acf9777c55a4e9b2792c266b19f7dc
parent 3f41b850c443c7c2c2188db2b7fb528b1b1d7bba
Author: Anders Damsgaard <[email protected]>
Date: Fri, 2 Dec 2022 15:50:12 +0000
aoc2: remove extra braces
Diffstat:
M 2/aoc2 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/2/aoc2 b/2/aoc2
t@@ -12,11 +12,10 @@ BEGIN {
sum += value[$2]
if ($1 == $2)
sum += 3
- else {
+ else
if (($1 == "A" && $2 == "B") ||
($1 == "B" && $2 == "C") ||
($1 == "C" && $2 == "A"))
sum += 6
- }
}
END { print sum }
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.