結果

問題 No.1593 Perfect Distance
ユーザー Fullmoon85072Fullmoon85072
提出日時 2021-11-28 15:08:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 81,528 KB
実行使用メモリ 61,952 KB
最終ジャッジ日時 2024-07-01 09:37:52
合計ジャッジ時間 1,862 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())

twoN = math.pow(N, 2)

count = 0
for x in range(N):
    y = math.sqrt(twoN - math.pow(x+1, 2))
    if y > 1 and y == int(y):
        count += 1
print(count)
0