問題一覧 > 通常問題

No.1593 Perfect Distance

レベル : / AI推定難易度 : 171 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 406
作問者 : e869120 / テスター : NASU41 ygussany
お気に入りにしたユーザー ProblemId : 6415 / 自分の提出
問題文最終更新日: 2021-07-08 23:25:12
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もしくは右上の雲マークをクリックしてアカウントを作成してください。