P16283 [Lanqiao Cup 2026 NOI Qualifier Python Group A] Selecting Points on the Plane
Description
In the Cartesian coordinate plane, the fixed point $A$ is the origin $(0, 0)$.
Now consider all lattice points whose $x$-coordinate and $y$-coordinate are both between $0$ and $2026$. Please count the number of point pairs $\{B, C\}$ that satisfy the following conditions:
- Both $B$ and $C$ are lattice points described above, and neither of them coincides with $A$.
- $B \neq C$.
- The area of the triangle formed by points $A, B, C$ is an integer.
If $A, B, C$ are collinear, the area of the triangle is defined as $0$, and this case is also included in the answer.
The pair $\{B, C\}$ is unordered, meaning that $\{B, C\}$ and $\{C, B\}$ are considered the same pair.
Input Format
N/A
Output Format
This is a fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer; any extra content will result in no score.
Explanation/Hint
Translated by ChatGPT 5