#P16283. [蓝桥杯 2026 省 Python A 组] 平面选点

    ID: 18298 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及 上传者: 标签>数学组合数学2026蓝桥杯省赛行列式

[蓝桥杯 2026 省 Python A 组] 平面选点

Problem Description

In the Cartesian coordinate plane, the fixed point AA is the origin (0,0)(0, 0).

Now consider all lattice points whose xx-coordinate and yy-coordinate are both between 00 and 20262026. Please count the number of point pairs {B,C}\{B, C\} that satisfy the following conditions:

  • Both BB and CC are lattice points described above, and neither of them coincides with AA.
  • B≠CB \neq C.
  • The area of the triangle formed by points A,B,CA, B, C is an integer.

If A,B,CA, B, C are collinear, the area of the triangle is defined as 00, and this case is also included in the answer.

The pair {B,C}\{B, C\} is unordered, meaning that {B,C}\{B, C\} and {C,B}\{C, B\} are considered the same pair.

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.



Hint

Translated by ChatGPT 5