027. Money Sum

Codeforces
IDCF10269027
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You have made $n$ payments in the past year, and you would like to figure out how much money you have spent in total, in cents. The first line of input contains a positive integer $n$, indicating the number of payments that you have made. The next $n$ lines each contain a positive integer $m$, indicating the amount that you paid in cents. Output a single positive integer $s$: the amount of money that you have spent in total, in cents. ## Input The first line of input contains a positive integer $n$, indicating the number of payments that you have made. The next $n$ lines each contain a positive integer $m$, indicating the amount that you paid in cents. ## Output Output a single positive integer $s$: the amount of money that you have spent in total, in cents. [samples]
**Definitions** Let $ n \in \mathbb{Z}^+ $ be the number of payments. Let $ M = (m_1, m_2, \dots, m_n) $ be a sequence of positive integers, where $ m_i $ is the amount of the $ i $-th payment in cents. **Constraints** 1. $ n \geq 1 $ 2. $ m_i \geq 1 $ for all $ i \in \{1, 2, \dots, n\} $ **Objective** Compute the total spent: $$ s = \sum_{i=1}^{n} m_i $$
API Response (JSON)
{
  "problem": {
    "name": "027. Money Sum",
    "description": {
      "content": "You have made $n$ payments in the past year, and you would like to figure out how much money you have spent in total, in cents. The first line of input contains a positive integer $n$, indicating the",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269027"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You have made $n$ payments in the past year, and you would like to figure out how much money you have spent in total, in cents.\n\nThe first line of input contains a positive integer $n$, indicating the...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of payments.  \nLet $ M = (m_1, m_2, \\dots, m_n) $ be a sequence of positive integers, where $ m_i $ is the amount of the $ i $-th payment in ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments