Pro.ID22197 TitleDiamond Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22197 AC0 Submit0 Ratio- 时间&空间限制描述Two integers m and n are given. Choose four different points in Cartesian. Coordinate. The horizontal coordinate of points should be integer in the range [0, m]. The vertical coordinate of points should be integer in the range [0, n]. How many ways of choosing to form a diamond? 输入A line contains two positive integers m and n. ( m ≤ 1000 and n ≤ 1000 ) Input may contain as many as one million cases. Process to the end of file. 输出Description Two integers m and n are given. Choose four different points in Cartesian. Coordinate. The horizontal coordinate of points should be integer in the range [0, m]. The vertical coordinate of points should be integer in the range [0, n]. How many ways of choosing to form a diamond? Input A line contains two positive integers m and n. ( m ≤ 1000 and n ≤ 1000 ) Input may contain as many as one million cases. Process to the end of file. Output For each case, output a line contains the calculate result. Sample Input 2 2 Sample Output 6 Source 样例输入2 2 样例输出6 作者 |