You are given an equation of the form x1+x2+...+xN=K. You need to find the total number of positive integral solutions of this equation.
The first line of the input contains an integer T, denoting the number of test cases. Then T test case follows. Each testcase contains a single line that denotes the equation.
Print the total number of positive integral solutions.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.