Our social:

Tcs codevita Season 5 round 1 Even Sum program Answer (solution)

Problem : Even Sum
A number is even if it is divisible by 2, but in this case a number is even if the active bits (1s in its binary representation) of a given number are 2. So your task is to find the sum of first N even numbers.

Input Format:

First line of the input contains an integer T denoting the number of test cases.

Each of the next T lines contains a single integer N.
Output Format:

For each test case, print a single integer denoting sum of first N even numbers mod 1000000007.
Constraints:
  1. 0 < N <=10^5

Example:

Example NumberSample InputSample Output
1
1
2

8
2
2
15
25

315
666



If you have solution for this question please comment below your program for any doubts or ant querry,,,!! thanks