E. Ya Rajaie and Books

Codeforces
IDCF10110E
Time2000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Mr. Ya Rajaie has N books and wants to put them in bookshelves, each bookshelf can have at most 5 books. Find the minimum number of bookshelves needed to store the N books. The first line of input contains a single integer T, the number of test cases. Each test case contains a single integer N (1 ≤ N ≤ 109), the number of Ya’s books. For each test case, print on a single line the minimum number of bookshelves needed to store the books. ## Input The first line of input contains a single integer T, the number of test cases.Each test case contains a single integer N (1 ≤ N ≤ 109), the number of Ya’s books. ## Output For each test case, print on a single line the minimum number of bookshelves needed to store the books. [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 books. **Constraints** 1. $ 1 \le T \le 10^5 $ 2. For each $ k $, $ 1 \le N_k \le 10^9 $ **Objective** For each test case $ k $, compute the minimum number of bookshelves required, where each bookshelf holds at most 5 books: $$ \left\lceil \frac{N_k}{5} \right\rceil $$
API Response (JSON)
{
  "problem": {
    "name": "E. Ya Rajaie and Books",
    "description": {
      "content": "Mr. Ya Rajaie has N books and wants to put them in bookshelves, each bookshelf can have at most 5 books. Find the minimum number of bookshelves needed to store the N books. The first line of input co",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10110E"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Mr. Ya Rajaie has N books and wants to put them in bookshelves, each bookshelf can have at most 5 books. Find the minimum number of bookshelves needed to store the N books.\n\nThe first line of input co...",
      "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 books.\n\n**Constraints**  \n1. $ 1...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments