Kingdom of Mathematics
题号:NC200600
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Hery is also a lover of math, he comes to the Kingdom of Mathematics, but to enter this country, he has to answer the soldier's question: there is a function f(x) satisfy:

f(0)=1,
f(1)=1,
2f(n)+f(n+1)=f(n+2)-2n+1

Please tell the soldier the result of:



May be the answer is too large, so you just need to module the result to .

输入描述:

The first line is an integer T, the number of test cases.
Next T lines, for each line, there is an integer n.

输出描述:

For each n, output the answer.
示例1

输入

复制
3
1
5
100

输出

复制
1
17
984247525