- Summing the N series
There is a sequence whose term is
Evaluate the series
The series is .
Complete the summingSeries function in the editor below.
summingSeries has the following parameter(s):
- int n: the inclusive limit of the range to sum
- int: the sum of the sequence, modulo
The first line of input contains , the number of test cases.
Each test case consists of one line containing a single integer .
Sample Input 0
2 2 1
Sample Output 0
Case 1: We have
Case 2: We have