summaryrefslogtreecommitdiff
path: root/02/1.lua
blob: 534bbb7a1987f0b43738c25f58effe29ffec5e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require("ext")

local points = {
	["A X"] = 1 + 3,
	["A Y"] = 2 + 6,
	["A Z"] = 3 + 0,

	["B X"] = 1 + 0,
	["B Y"] = 2 + 3,
	["B Z"] = 3 + 6,

	["C X"] = 1 + 6,
	["C Y"] = 2 + 0,
	["C Z"] = 3 + 3,
}

local score = 0
for line in io.lines() do
	score = score + points[line]
end
print(score)