Computer Science, asked by Mahibullah5471, 22 days ago

Today is Bran’s birthday. So Bran enjoying his birthday party with his friends. Bran has n number of friends. To make the party more enjoyable they are playing a game. In this game, each of Bran’s friends guesses a unique non-negative integer number less than the number of Bran’s friends. Then Bran has to add all these numbers that Bran’s friends have guessed and tell the summation. Now Bran asked you to help him. Given a number n and you have to say what value Bran would say to his friends.
Input
First line contains an integer t the number of test cases. Next, each line contains an integer n.
Constraint
1<=t<=10
1<=n<=4∗108
Output
For each test case output the value and a new line.

Answers

Answered by siddhichaplot
0

I don't understand

I read first time

Similar questions