BETA
School Problem's Submission isn't counted in score!

Total Submissions: 883 Accuracy:

60.59%

Number of Diagonals
     

Given a number N. Write a program to the find number of diagonals possible in N sided convex polygon.

Input:
First line of input contains a single integer T which denotes the number of test cases. T test cases follows. First line of each test case contains a single integer N.

Output:
For each test case print number of diagonals possible in N sided convex polygon.

Constraints:
1<=T<=100
3<N<=104

Example:
Input:

2
5
6
Output:
5
9

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.