結果

問題 No.1593 Perfect Distance
ユーザー ああいいああいい
提出日時 2022-01-08 18:42:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 76,536 KB
最終ジャッジ日時 2023-08-09 04:15:01
合計ジャッジ時間 2,922 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,228 KB
testcase_01 AC 68 ms
71,248 KB
testcase_02 AC 69 ms
71,500 KB
testcase_03 AC 67 ms
71,412 KB
testcase_04 AC 66 ms
71,336 KB
testcase_05 AC 68 ms
71,612 KB
testcase_06 AC 67 ms
71,636 KB
testcase_07 AC 68 ms
71,672 KB
testcase_08 AC 71 ms
71,256 KB
testcase_09 AC 73 ms
76,536 KB
testcase_10 AC 70 ms
76,364 KB
testcase_11 AC 75 ms
76,472 KB
testcase_12 AC 75 ms
76,332 KB
testcase_13 AC 76 ms
76,240 KB
testcase_14 AC 78 ms
76,288 KB
testcase_15 AC 79 ms
76,384 KB
testcase_16 AC 74 ms
76,280 KB
testcase_17 AC 69 ms
71,200 KB
testcase_18 AC 67 ms
71,236 KB
testcase_19 AC 70 ms
71,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

ans = 0
from math import sqrt

for x in range(1,N):
    yy = N *N - x * x
    if yy == int(sqrt(yy)) ** 2:ans += 1
print(ans)
0