結果

問題 No.1593 Perfect Distance
ユーザー trineutrontrineutron
提出日時 2021-07-09 21:25:19
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 303 ms / 2,000 ms
コード長 123 bytes
コンパイル時間 58 ms
使用メモリ 7,996 KB
最終ジャッジ日時 2023-02-01 21:56:54
合計ジャッジ時間 2,449 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 14 ms
7,692 KB
testcase_01 AC 15 ms
7,960 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 AC 15 ms
7,784 KB
testcase_04 AC 14 ms
7,924 KB
testcase_05 AC 15 ms
7,840 KB
testcase_06 AC 14 ms
7,892 KB
testcase_07 AC 15 ms
7,772 KB
testcase_08 AC 15 ms
7,764 KB
testcase_09 AC 27 ms
7,844 KB
testcase_10 AC 54 ms
7,892 KB
testcase_11 AC 77 ms
7,996 KB
testcase_12 AC 123 ms
7,756 KB
testcase_13 AC 132 ms
7,852 KB
testcase_14 AC 150 ms
7,772 KB
testcase_15 AC 214 ms
7,844 KB
testcase_16 AC 303 ms
7,772 KB
testcase_17 AC 14 ms
7,752 KB
testcase_18 AC 14 ms
7,852 KB
testcase_19 AC 14 ms
7,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for i in range(1, n):
    d = n**2 - i**2
    if int(d**0.5)**2 == d:
        ans += 1
print(ans)
0