aboutsummaryrefslogtreecommitdiff
path: root/2022/02/puzzle-2.awk
blob: bcd090c9098d9bf855f05e740c987c262c73d7be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/awk -f

/Y/ { s += 3 }
/Z/ { s += 6 }

/A Y|B X|C Z/ { s += 1 }
/B Y|C X|A Z/ { s += 2 }
/C Y|A X|B Z/ { s += 3 }

END { print s }