Anton and Polyhedrons
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Anton 喜欢正多面体。正多面体有五种:
- 四面体(Tetrahedron):有 4 个三角形面。
- 正方体(Cube):有 6 个正方形面。
- 八面体(Octahedron):有 8 个三角形面。
- 十二面体(Dodecahedron):有 12 个五边形面。
- 二十面体(Icosahedron):有 20 个三角形面。
Anton 有一个包含 n 个正多面体的集合。有一天,他决定要计算出他这些正多面体的总面数。帮助 Anton 找到这个答案。
输入格式:
-
第一行:一个整数 n(1 ≤ n ≤ 200 000),表示正多面体的个数。
-
接下来的 n 行:每一行是一个字符串 si,表示第 i 个正多面体的名称。字符串可能是以下之一:
- "Tetrahedron"
- "Cube"
- "Octahedron"
- "Dodecahedron"
- "Icosahedron"
输出格式:
- 输出一个整数,表示所有正多面体的面数之和。
示例:
输入 1:
4
Icosahedron
Cube
Tetrahedron
Dodecahedron
输出 1:
42
输入 2:
3
Dodecahedron
Octahedron
Octahedron
输出 2:
28
说明:
在第一个例子中,Anton 有一个二十面体、一个正方体、一个四面体和一个十二面体。
- 二十面体有 20 个面,
- 正方体有 6 个面,
- 四面体有 4 个面,
- 十二面体有 12 个面。
总面数是 20 + 6 + 4 + 12 = 42。