No.1593 Perfect Distance
問題文最終更新日: 2021-07-08 23:25:12
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
競プロ典型 90 問 期末試験
(順位表)
の他の問題:
Problem Statement
How many pairs of positive integers $(x, y)$ satisfy $\sqrt{x^2 + y^2} = N$?
Input
$N$
Output
Output the answer.
Constraints
- $1 \leq N \leq 200000$
- $N$ is an integer
Sample
Sample 1
Input
5
Output
2
The $2$ pairs $(x, y) = (3, 4), (4, 3)$ satisfy the condition.
Sample 2
Input
6
Output
0
Sample 3
Input
25
Output
4
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
e869120
NASU41