結果

問題 No.1593 Perfect Distance
ユーザー Fullmoon85072
提出日時 2021-11-28 14:53:54
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 276 bytes
コンパイル時間 700 ms
コンパイル使用メモリ 82,144 KB
実行使用メモリ 83,128 KB
最終ジャッジ日時 2024-07-01 09:17:51
合計ジャッジ時間 4,728 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other AC * 9 TLE * 1 -- * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())

twoN = math.pow(N, 2)

count = 0
for x in range(N):
    for y in range(N):
        dx = math.pow(x, 2)
        dy = math.pow(y, 2)
        if dx + dy == twoN:
            count += 1
        elif dx + dy > twoN:
            continue

print(count)
0