Series!!!
CodeChefOpen on judge ↗
You are given a sequence whose nth term is Tn = n2 - (n - 1)2. You have to evaluate the series Sn = T1+T2+T3+.......+Tn Find Sn mod(109 + 7). ### Input Format: The first line of input contains T, the number of test cases. Each test case consists of one line containing a single integer n. ### Output Format: For each test case, print the required answer in a line. ### Constraints: - 1 <= T <=
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start