117. Books

Codeforces
IDCF10269117
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You have a list of $n$ books. You want to read one complete book, but you want to read as few pages as possible. You're given the list of how many pages each book has. Figure out the minimum number of pages that you have to read, reading at least one complete book. The first line of input contains a positive integer $n$: the number of books. The next line contains $n$ space-separated integers: the number of pages of each book. Output a single positive integer $p$: the minimum number of pages that you have to read, if you read at least one complete book. ## Input The first line of input contains a positive integer $n$: the number of books. The next line contains $n$ space-separated integers: the number of pages of each book. ## Output Output a single positive integer $p$: the minimum number of pages that you have to read, if you read at least one complete book. [samples]
**Definitions** Let $ n \in \mathbb{Z}^+ $ be the number of books. Let $ P = (p_1, p_2, \dots, p_n) $ be a sequence of positive integers, where $ p_i $ is the number of pages in book $ i $. **Constraints** $ n \geq 1 $, and $ p_i \geq 1 $ for all $ i \in \{1, \dots, n\} $. **Objective** Find $ \min_{i \in \{1, \dots, n\}} p_i $.
API Response (JSON)
{
  "problem": {
    "name": "117. Books",
    "description": {
      "content": "You have a list of $n$ books. You want to read one complete book, but you want to read as few pages as possible. You're given the list of how many pages each book has. Figure out the minimum number of",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269117"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You have a list of $n$ books. You want to read one complete book, but you want to read as few pages as possible. You're given the list of how many pages each book has. Figure out the minimum number of...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of books.  \nLet $ P = (p_1, p_2, \\dots, p_n) $ be a sequence of positive integers, where $ p_i $ is the number of pages in book $ i $.\n\n**Con...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments