405931: GYM102163 F Research projects
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
F. Research projectstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
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.
InputIn 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 \le N, K \le 10^{18} $$$
OutputFor each test case print the least number of the new projects.
ExampleInput4 12 7 11 4 3 1 34 4Output
1 2 1 5