#K16151. Maximize Ice Cream Cones Serving
Maximize Ice Cream Cones Serving
Maximize Ice Cream Cones Serving
You are given a number of ice cream scoops for multiple test cases. In each test case, a large cone requires 2 scoops and a small cone requires 1 scoop. To maximize the serving size, you should use as many large cones as possible and then use small cones with the remaining scoops if any.
Formally, for each test case with s scoops, the number of large cones is \(\lfloor s/2 \rfloor\) and the number of small cones is \(s \bmod 2\). Your task is to compute these counts for every test case and output the result.
inputFormat
The input begins with a single integer t
(\(1 \le t \le 10^5\)) specifying the number of test cases. Each of the following t
lines contains one integer representing the number of ice cream scoops available in that test case.
outputFormat
For each test case, output two space-separated integers on a new line: the first integer is the number of large cones and the second is the number of small cones.
## sample1
1
0 1
</p>