#P3166. [CQOI2014] 数三角形
[CQOI2014] 数三角形
Description
Given an grid, compute how many triangles have all three vertices at grid points. Note that the three points of a triangle must not be collinear.
Input Format
The input consists of one line containing two space-separated positive integers and .
Output Format
Output a single positive integer, which is the number of such triangles.
2 2
76
Hint
Constraints
For all test points, .
Translated by ChatGPT 5
京公网安备 11011102002149号