#C6109. Count Even Integers Divisible by 4
Count Even Integers Divisible by 4
Count Even Integers Divisible by 4
You are given an integer \(M\) and you need to compute the number of positive integers up to \(M\) that are divisible by 4. Note that any number divisible by 4 is also even. The answer for each test case can be computed using the formula:
\(\lfloor \frac{M}{4} \rfloor\)
For example, if \(M=8\) then the output is \(2\) because the numbers 4 and 8 are divisible by 4. Similarly, if \(M=15\) then the result is \(3\) (i.e. 4, 8, and 12).
You are required to process multiple test cases. Read the number of test cases from the input and then process each test case accordingly.
inputFormat
The first line contains a single integer \(T\), representing the number of test cases. Each of the following \(T\) lines contains one integer \(M\) (\(1 \le M \le 5 \times 10^7\)), which is the upper bound for the range of integers to consider.
outputFormat
For each test case, output a single line containing one integer representing the number of integers between 1 and \(M\) that are divisible by 4. Each output should be printed on its own line.
## sample2
8
15
2
3
</p>