Under construction

Still being built. Things may change

Covering an equilateral triangle

Time limit1sMemory limit256 MB

Summary
Given side lengths A and B with A divisible by B, compute the minimum number of side-B equilateral triangles that cover a side-A equilateral triangle.
Level

Easy3 of 10

Topics
Math, Geometry
Solved
No attempts yet

Problem

Jieun likes to cover things. This time she wants to cover an equilateral triangle with side length AA completely, using equilateral triangles with side length BB.

You are given two integers AA and BB. Here B≤AB \le A and AA is divisible by BB. Find the minimum number of triangles with side length BB that are needed to cover the triangle with side length AA completely.

Input

The first line contains the number of test cases TT. (1≤T≤10001 \le T \le 1000)

Each of the next TT lines contains two integers AA and BB separated by a space. (1≤B≤A≤1061 \le B \le A \le 10^6, and AA is divisible by BB.)

Output

For each test case, print on its own line the minimum number of triangles with side length BB that are needed to cover the triangle with side length AA completely.

Examples2

  1. Example 1

    Input
    2
    2 1
    3 3
    
    Expected output
    4
    1
    
  2. Example 2

    Input
    3
    9 3
    12 4
    100 10
    
    Expected output
    9
    9
    100