F. Research projects

Codeforces
IDCF10216F
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Each year in NCD, students participate in school research projects. Each project must have a team of at least $1$ student and at most $6$ students. And each student can only participate in one project. However, not all the students found teams to join this year. So the administration will set new projects to accommodate these students. Your job is to find out the minimum number of new projects to accommodate all these students. In the first line $T$, the number of test cases. For each test case you will be given ($N$, $K$) the number of students in the NCD and the number of students who have projects. $1 <= N, K <= 10^(18)$ For each test case print the least number of the new projects. ## Input In the first line $T$, the number of test cases.For each test case you will be given ($N$, $K$) the number of students in the NCD and the number of students who have projects.$1 <= N, K <= 10^(18)$ ## Output For each test case print the least number of the new projects. [samples]
**Definitions** Let $ T \in \mathbb{Z} $ be the number of test cases. For each test case, let $ N, K \in \mathbb{Z} $ denote the total number of students and the number of students already assigned to projects, respectively. **Constraints** 1. $ 1 \leq T \leq \text{unknown bound} $ (implied by input format) 2. $ 1 \leq K \leq N \leq 10^{18} $ **Objective** Let $ U = N - K $ be the number of unassigned students. Each new project can accommodate at most $ 6 $ students. Find the minimum number of new projects required: $$ \left\lceil \frac{U}{6} \right\rceil $$
API Response (JSON)
{
  "problem": {
    "name": "F. Research projects",
    "description": {
      "content": "Each year in NCD, students participate in school research projects. Each project must have a team of at least $1$ student and at most $6$ students. And each student can only participate in one project",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10216F"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Each year in NCD, students participate in school research projects. Each project must have a team of at least $1$ student and at most $6$ students. And each student can only participate in one project...",
      "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, let $ N, K \\in \\mathbb{Z} $ denote the total number of students and the number of students already assigne...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments