This page is still under construction.

Parts of this page are still being built. What you see may change.

Cookie Lover

Time limit1sMemory limit256 MB

Summary
Given N cookies and C eaten per day, compute how many days pass until none remain.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Cheolsu likes cookies more than anything else. Wherever there are cookies, Cheolsu is there too. Every day he eats CC of the cookies he holds. If fewer than CC cookies are left, he eats all of them. Given that Cheolsu holds NN cookies, find how many days he eats cookies for.

Input

The first line contains the number of test cases TT. Each of the next TT lines contains one test case: the number of cookies NN that Cheolsu holds and the number of cookies CC he eats each day, separated by a space.

Output

For each test case, print on its own line how many days Cheolsu eats cookies for.

Constraints

  • 0<T<1000 < T < 100
  • 0<N<1,000,000,0000 < N < 1{,}000{,}000{,}000
  • 0<C<5,0000 < C < 5{,}000

Examples2

  1. Example 1

    Input
    2
    6 2
    10 3
    
    Expected output
    3
    4
    
  2. Example 2

    Input
    5
    7 7
    8 7
    13 7
    14 7
    15 7
    
    Expected output
    1
    2
    2
    2
    3