Problem Solution Codechef
All of Chef’s friends are playing fantasy cricket based upon the ODI World Cup, and Chef would like to join them.
For a certain cricket match, Chef has decided upon his team of 11 players. However, he hasn’t yet decided who should be the captain and who should be the vice-captain.
He’s narrowed his decision down to � players out of the 11, from which he’ll choose one to be the captain and one to be the vice captain.
How many different choices does he have?
- The first line of input will contain a single integer �, denoting the number of test cases.
- The first and the only line of each testcase contains a single integer �, the number of players Chef is considering.
For each test case, output on a new line the number of possible choices of captain and vice-captain.
2 2 3
Test case 1: With �=2, there are only two possibilities: one of the players must be selected as the captain, and the other will become the vice-captain.
Test case 2: It can be shown that there are 6 possibilities in total for captain/vice-captain choices.