Tutorials  Articles  Notifications  Login  Signup


How many squares can come in a triangle

Problem statement

Suppose, you are given an isosceles tirangle with base B now your task in this problem is to firgure out how many 2×2 squares can come into it such that, one side of square is parallel to the base of triangle.

Important: Base is the shortest side of the triangle



Input format

First line will contain numbers of test cases, let's call it T

Then, following T lines will contain a single integer B, the base of triangle



Output format

Output exactly T lines, each line containing the number of squares that can fit into triangle.



Constraints

1 ≤ T ≤ 103
1 ≤ B ≤ 104



Sample Input 1
10
1
2
3
4
5
6
7
8
9
10


Sample output 1
0
0
0
1
1
3
3
6
6
10



Explanation

Explanation is not available for this problem.







// Write your code here in C++


Editiorial

Not available




go back Go back to Interview



Author: Rajan Shah

Level: Easy

Uploaded on: Dec. 5, 2018

Lab: Interview

Section: Basics


Found something wrong ? Inform us



Other problems from this lab

Print Hello world

Withdraw money from ATM

Multiply matrices

Adding Reversed Numbers