P12947 [HackerEarth] subset sum 2
普及
题目描述

Peter is very weak in mathematics. His father gave him a problem and left to work. He is a lazy lad and he wants you to find the solution.

Given a set A which contains elements ranging from 1 to N.Find the sum of the elements in all possible subsets of the given set.

Input Format:

T, the number of test cases.
Following T lines contain N, number of elements in set.

Output Format:

T lines indicating the subset sum. print the answer modulo (109+7).

Constraints: 

1 ≤ T ≤ 1000
1 ≤ N ≤ 2000

SAMPLE INPUT
2
6
3

SAMPLE OUTPUT
672
24

输入格式

见题面

输出格式

见题面

样例输入
2 6 3 SAMPLE
样例输出
672 24