{"problem":{"name":"A. Anton and Polyhedrons","description":{"content":"Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons: *   _Tetrahedron_. Tetrahedron has 4 triangular faces. *   _Cube_. Cube has 6 squar","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF785A"},"statements":[{"statement_type":"Markdown","content":"Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:\n\n*   _Tetrahedron_. Tetrahedron has 4 triangular faces.\n*   _Cube_. Cube has 6 square faces.\n*   _Octahedron_. Octahedron has 8 triangular faces.\n*   _Dodecahedron_. Dodecahedron has 12 pentagonal faces.\n*   _Icosahedron_. Icosahedron has 20 triangular faces.\n\nAll five kinds of polyhedrons are shown on the picture below:\n\n<center>![image](https://espresso.codeforces.com/51d90af2e3b31c36f12732b895a92e9b8d2b82bc.png)</center>Anton has a collection of _n_ polyhedrons. One day he decided to know, how many faces his polyhedrons have in total. Help Anton and find this number!\n\n## Input\n\nThe first line of the input contains a single integer _n_ (1 ≤ _n_ ≤ 200 000) — the number of polyhedrons in Anton's collection.\n\nEach of the following _n_ lines of the input contains a string _s__i_ — the name of the _i_\\-th polyhedron in Anton's collection. The string can look like this:\n\n*   \"_Tetrahedron_\" (without quotes), if the _i_\\-th polyhedron in Anton's collection is a tetrahedron.\n*   \"_Cube_\" (without quotes), if the _i_\\-th polyhedron in Anton's collection is a cube.\n*   \"_Octahedron_\" (without quotes), if the _i_\\-th polyhedron in Anton's collection is an octahedron.\n*   \"_Dodecahedron_\" (without quotes), if the _i_\\-th polyhedron in Anton's collection is a dodecahedron.\n*   \"_Icosahedron_\" (without quotes), if the _i_\\-th polyhedron in Anton's collection is an icosahedron.\n\n## Output\n\nOutput one number — the total number of faces in all the polyhedrons in Anton's collection.\n\n[samples]\n\n## Note\n\nIn the first sample Anton has one icosahedron, one cube, one tetrahedron and one dodecahedron. Icosahedron has 20 faces, cube has 6 faces, tetrahedron has 4 faces and dodecahedron has 12 faces. In total, they have 20 + 6 + 4 + 12 = 42 faces.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Anton 最喜欢的几何图形是正多面体。注意，正多面体共有五种：\n\n所有五种多面体如下图所示：\n\nAnton 拥有一个包含 #cf_span[n] 个正多面体的收藏。有一天，他想知道他的所有多面体一共有多少个面。请帮助 Anton 求出这个总数！\n\n输入的第一行包含一个整数 #cf_span[n] #cf_span[(1 ≤ n ≤ 200 000)] —— Anton 收藏中多面体的数量。\n\n接下来的 #cf_span[n] 行，每行包含一个字符串 #cf_span[si] —— Anton 收藏中第 #cf_span[i] 个正多面体的名称。该字符串可能如下所示：\n\n请输出一个数字 —— Anton 收藏中所有多面体的面数总和。\n\n在第一个样例中，Anton 有一个二十面体、一个立方体、一个四面体和一个十二面体。二十面体有 #cf_span[20] 个面，立方体有 #cf_span[6] 个面，四面体有 #cf_span[4] 个面，十二面体有 #cf_span[12] 个面。它们总共有 #cf_span[20 + 6 + 4 + 12 = 42] 个面。\n\n## Input\n\n输入的第一行包含一个整数 #cf_span[n] #cf_span[(1 ≤ n ≤ 200 000)] —— Anton 收藏中多面体的数量。接下来的 #cf_span[n] 行，每行包含一个字符串 #cf_span[si] —— Anton 收藏中第 #cf_span[i] 个正多面体的名称。该字符串可能如下所示：\n\"_Tetrahedron_\"（不含引号），如果第 #cf_span[i] 个正多面体是四面体。\n\"_Cube_\"（不含引号），如果第 #cf_span[i] 个正多面体是立方体。\n\"_Octahedron_\"（不含引号），如果第 #cf_span[i] 个正多面体是八面体。\n\"_Dodecahedron_\"（不含引号），如果第 #cf_span[i] 个正多面体是十二面体。\n\"_Icosahedron_\"（不含引号），如果第 #cf_span[i] 个正多面体是二十面体。\n\n## Output\n\n请输出一个数字 —— Anton 收藏中所有多面体的面数总和。\n\n[samples]\n\n## Note\n\n在第一个样例中，Anton 有一个二十面体、一个立方体、一个四面体和一个十二面体。二十面体有 #cf_span[20] 个面，立方体有 #cf_span[6] 个面，四面体有 #cf_span[4] 个面，十二面体有 #cf_span[12] 个面。它们总共有 #cf_span[20 + 6 + 4 + 12 = 42] 个面。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of polyhedrons, with $ 1 \\leq n \\leq 200{,}000 $.  \nLet $ S = (s_1, s_2, \\dots, s_n) $ be a sequence of strings, where each $ s_i \\in \\{ \\text{\"Tetrahedron\"}, \\text{\"Cube\"}, \\text{\"Octahedron\"}, \\text{\"Dodecahedron\"}, \\text{\"Icosahedron\"} \\} $ denotes the type of the $ i $-th polyhedron.\n\nDefine the face function $ f: \\{ \\text{\"Tetrahedron\"}, \\text{\"Cube\"}, \\text{\"Octahedron\"}, \\text{\"Dodecahedron\"}, \\text{\"Icosahedron\"} \\} \\to \\mathbb{Z} $ as:  \n$$\nf(\\text{\"Tetrahedron\"}) = 4, \\quad\nf(\\text{\"Cube\"}) = 6, \\quad\nf(\\text{\"Octahedron\"}) = 8, \\\\\nf(\\text{\"Dodecahedron\"}) = 12, \\quad\nf(\\text{\"Icosahedron\"}) = 20\n$$\n\n**Objective**  \nCompute the total number of faces:  \n$$\n\\sum_{i=1}^{n} f(s_i)\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF785A","tags":["implementation","strings"],"sample_group":[["4\nIcosahedron\nCube\nTetrahedron\nDodecahedron","42"],["3\nDodecahedron\nOctahedron\nOctahedron","28"]],"created_at":"2026-03-03 11:00:39"}}