#C2755. Maximum Smoke Bombs Deployment
Maximum Smoke Bombs Deployment
Maximum Smoke Bombs Deployment
Team Alpha is facing a strategic challenge in a treehouse with several rooms. They wish to deploy smoke bombs to secure their position. However, to avoid detection or interference, the smoke bombs can only be placed in alternate rooms. Given a treehouse with n rooms arranged sequentially, the maximum number of smoke bombs that can be deployed is given by the formula:
$$ \left\lfloor \frac{n+1}{2} \right\rfloor $$
Your task is to compute this number for multiple test cases.
Note: The input is read from standard input (stdin) and the output should be written to standard output (stdout). Each test case consists of a single integer n representing the number of rooms in the treehouse.
inputFormat
The first line of the input contains a single integer T representing the number of test cases. Then, T lines follow, each containing one integer n, the number of rooms.
Example:
3 3 5 4
outputFormat
For each test case, output the maximum number of smoke bombs that can be deployed, one per line.
Example:
2 3 2## sample
3
3
5
4
2
3
2
</p>