#P8692. [蓝桥杯 2019 国 C] 数正方形
[蓝桥杯 2019 国 C] 数正方形
Problem Description
On an lattice of points, choose points that form exactly the four vertices of a square. How many different ways are there?
Since the result may be very large, you only need to output the remainder modulo .

As shown in the figure above, all these squares are valid.
Input Format
The input contains one integer .
Output Format
Output one integer representing the answer.
4
20
Hint
For all test cases, .
Lanqiao Cup 2019 National Contest Group C, Problem G.
Translated by ChatGPT 5