004. Polygons

Codeforces
IDCF10269004
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
The sum of the angles in a triangle is 180, and the sum of the angles in a square is 360. In fact, the sum of angles in any polygon increases by 180 with each side added to the polygon. In this problem, you must figure out the sum of angles of a polygon, given its number of sides. The first line of the input contains a positive integer _T_ indicating the number of test cases in the problem. The next _T_ lines each contain a positive integer _n_ (_1_ <= _n_ <= _100_): the number of sides of each polygon. Output _T_ integers: the sum of the angles in each polygon. ## Input The first line of the input contains a positive integer _T_ indicating the number of test cases in the problem. The next _T_ lines each contain a positive integer _n_ (_1_ <= _n_ <= _100_): the number of sides of each polygon. ## Output Output _T_ integers: the sum of the angles in each polygon. [samples]
**Definitions** Let $ T \in \mathbb{Z}^+ $ be the number of test cases. For each test case $ k \in \{1, \dots, T\} $, let $ n_k \in \mathbb{Z}^+ $ denote the number of sides of a polygon. **Constraints** 1. $ 1 \le T \le 100 $ 2. For each $ k \in \{1, \dots, T\} $, $ 3 \le n_k \le 100 $ (note: polygon must have at least 3 sides) **Objective** For each polygon with $ n_k $ sides, compute the sum of interior angles: $$ S_k = 180(n_k - 2) $$
API Response (JSON)
{
  "problem": {
    "name": "004. Polygons",
    "description": {
      "content": "The sum of the angles in a triangle is 180, and the sum of the angles in a square is 360. In fact, the sum of angles in any polygon increases by 180 with each side added to the polygon. In this proble",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269004"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "The sum of the angles in a triangle is 180, and the sum of the angles in a square is 360. In fact, the sum of angles in any polygon increases by 180 with each side added to the polygon. In this proble...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ T \\in \\mathbb{Z}^+ $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $, let $ n_k \\in \\mathbb{Z}^+ $ denote the number of sides of a polygon.\n\n**Const...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments