Chefina and Swap SOLUTION
You are given a positive number N. Consider the grouping S=(1,2,… ,N). You ought to pick two components of this succession and trade them.
A trade is decent if there is a number M (1≤M<N) with the end goal that the whole of the primary M components of the subsequent succession is equivalent to the aggregate of its last N−M components. Locate the quantity of pleasant trades.
The main line of the info contains a solitary number T meaning the quantity of experiments. The portrayal of T experiments follows.
The solitary line of each experiment contains a solitary number N.
For each experiment, print a solitary line containing one number ― the quantity of decent trades.
Subtask #1 (10 focuses):
Subtask #2 (30 focuses):
Subtask #3 (60 focuses): unique imperatives
LOGIC VIDEO HAS BEEN REMOVED