結果

問題 No.1593 Perfect Distance
ユーザー somey-svsomey-sv
提出日時 2021-07-10 01:06:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 142 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 76,564 KB
最終ジャッジ日時 2023-09-14 12:31:53
合計ジャッジ時間 2,950 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,200 KB
testcase_01 AC 74 ms
71,264 KB
testcase_02 AC 72 ms
71,496 KB
testcase_03 AC 74 ms
71,212 KB
testcase_04 AC 74 ms
71,372 KB
testcase_05 AC 75 ms
71,256 KB
testcase_06 AC 72 ms
71,524 KB
testcase_07 AC 75 ms
71,420 KB
testcase_08 AC 74 ms
71,400 KB
testcase_09 AC 79 ms
76,340 KB
testcase_10 AC 79 ms
76,240 KB
testcase_11 AC 81 ms
76,564 KB
testcase_12 AC 79 ms
76,412 KB
testcase_13 AC 80 ms
76,348 KB
testcase_14 AC 81 ms
76,372 KB
testcase_15 AC 82 ms
76,108 KB
testcase_16 AC 80 ms
76,100 KB
testcase_17 AC 74 ms
71,072 KB
testcase_18 AC 75 ms
71,252 KB
testcase_19 AC 76 ms
71,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

import math

ans = 0

for i in range(1, N):
    y = math.sqrt(N**2-i**2)
    if y.is_integer():
        ans += 1

print(ans)
0