1746.
All Kill
时间限制 4000 ms
内存限制 512 MB
Give nonnegative integers $x_{1...n}$ which are less than $32677$, calculate $y_{i,j}=x_i\times x_j\mod32677$. HazelFan wants to know how many sextuples $(a,b,c,d,e,f)$ are there, satisfies $\gcd(y_{a,b},y_{c,d})=\gcd(y_{c,d},y_{e,f})=\gcd(y_{e,f},y_{a,b})=1$, module $2^{30}$.
输入数据
输出数据
For each test case:
A single line contains a nonnegative integer, denoting the answer.
样例输入
复制
2
1
1
5
1 2 3 4 5
\n
\n
\n
\n
· · · · \n