#P2508. [HAOI2008] 圆上的整点

    ID: 1523 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 8 上传者: 标签>数学2008河南各省省选枚举,暴力最大公约数,gcd

[HAOI2008] 圆上的整点

Description

Given the circle (x2+y2=r2)(x^2+y^2=r^2), determine how many points on its circumference have integer coordinates.

Input Format

A single integer rr.

Output Format

The number of lattice points.

4
4

Hint

Constraints: r2000000000r\leq 2000 000 000.

Translated by ChatGPT 5