Description Input Output 输出test行,每行一个整数,表示答案。 Sample Input 1 2 2 2 3 1 Sample Output 3 HINT $Test<=50,Pi<=10^5,1<=Q1<=10^9$