After fixing the labeling issue from the Coaxial Cable Bundling Problem, Jakob has revealed that the boxed cables were being labeled with more information than necessary. As such, Jakob drafts up new instructions for the assembly workers who are bundling the cables:
D.N rods around the core, such that each rod touches both the core and the two other rods adjacent to it.T, such that the tube touches each rod.T and D.He prints out these new instructions and leaves them at each assembly area to ensure that they are followed. A few days later while performing a routine inspection of the production floor, Jakob observes one of the assembly workers creating a cable with the following cross-section:
9 Red rods of various diameters in a cable bundle.
Also note the centerpoint of the core in Yellow, and the centerpoint of the tube in Blue.
Jakob asks the assembly worker why they are using rods of all different sizes, but the operator refers Jakob to his new instructions, pointing out that nowhere is it stated anymore that the rods must be of equal size. Jakob scratches his head, cursing himself for such an oversight and lack of attention to detail while drafting the instructions!
Although Jakob is worried that an off-axis core might yield a defective cable, but tests the cable and confirms it does work as intended.
Furthermore he is able to use a small x-ray machine to
view the position of the core inside the cable, and so is able to determine the centerpoint of the core. He makes
note of the distance X between the core's centerpoint and the tube's centerpoint.
Unfortunately the material which the rods are made out of is not visible to the machine, and so their locations
are unable to be determined in already-built cables.
Given T, D, and X, calculate the quantity of rods N present inside the bundle.
Input Data
First line will be Q, the quantity of testcases.
Q lines will then follow, each with three space-separated values in the format T D X.
Answer
Should consist of Q space-separated values, being the value of N for each corresponding testcase.