SP11276 ADVNTURE - Adventure
Description
Rand has been sitting in a spaceship at the point (0,0,0) for a long time. One day, he got bored and decided to undertake an adventure.
Deciding upon an adventure has several complicated steps. First, Rand chooses a destination point (x,y,z) different from (0,0,0) such that 0
Input Format
The first line contains the number T, the number of test cases.
T lines follow, each contains the integers A,B,C,K, corresponding to one testcase
Output Format
Output T lines, each with one integer as the answer for the corresponding test case.