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

/X/ { s += 1 }
/Y/ { s += 2 }
/Z/ { s += 3 }

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

END { print s }