SUMMUL - Sum of products

题意翻译

### 题目描述 $T$ 组数据,每组数据给定一个正整数 $n$,求 **所有将 $n$ 分解为至少 $2$ 个正整数之和的乘积之和**。(拆分顺序不同也算方案不同) 例如 $n=3$ 时,$3 = 1 + 1 + 1 = 1 + 2 = 2+1$,所以答案为 $1 \times 1 \times 1 + 1 \times 2 + 2 \times 1 = 5$. ### 输入格式 第一行一个数 $T$,如题。 下面 $T$ 行,每行一个正整数 $n$. ### 输出格式 $T$ 行,答案对 $10^9 + 7$ 取模。 ### 样例输入 ``` 3 1 2 3 ``` ### 样例输出 ``` 0 1 5 ``` ### 数据范围 $1 \leq T \leq 10^3 , 1 \leq n \leq 10^9$.

题目描述

One boy Petya decided to practice in addition and multiplication of numbers. For this he chose some positive integer n, and ordered all the ways to decompose it into two or more terms of positive integers, and the ways in different order terms are considered to be different (for example, for n = 3 there are three ways: 1 + 2, 2 + 1 and 1 + 1 + 1). Then he replaced all the plus signs with multiplication, and added the results (for n = 3: 1 × 2 + 2 × 1 + 1 × 1 × 1 = 5). After practicing for the day he decided to check the correctness of his calculations. Help Petya find the right answers.

输入输出格式

输入格式


The first line contains T (1 <= T <= 1000) - the number of tests. Following T lines contain n (1 <= n <= 10 ^ 9).

输出格式


For each n from the input print the result Petya should get modulo 1000000007.

输入输出样例

输入样例 #1

3
1
2
3

输出样例 #1

0
1
5