Problem 3780 --I love cube

3780: I love cube

"
Time Limit $1$ 秒/Second(s) Memory Limit $128$ 兆字节/Megabyte(s)
提交总数 $0$ 正确数量 $0$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 几何 数学
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.
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
For each case, print an integer, which is the answer modulo 109+7
2
1
2
0
8

推荐代码 查看3780 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$ $ms]
内存最少[$ $KB]
第一AC
第一挑战

赛题来源/所属竞赛 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛