#P6961. I love cube

    ID: 5818 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>2021“MINIEYE杯”中国大学生算法设计超级联赛(2)

I love cube

Problem Description

Give you a cube with a side length of n-1. Find the number of equilateral triangles with three points on the cube point. Each side must be parallel to a certain surface of Oxy, Oxz, Oyz. Now you need to count how many such triangles there are.Each point can only be on the boundary or inner point of the cube, and the three coordinates x, y, and z of each point must be integers.

Input

The first line contains an integer $T(T<=1e5)$ . Then $T$ test cases follow.

Each test case contains a single Integer $n(0<=n<=1e18)$.

If n=0, output 0

Output

For each case, print an integer, which is the answer modulo $10^9+7$

2 1 2
0 8