結果

問題 No.1593 Perfect Distance
ユーザー hir355hir355
提出日時 2021-07-09 21:23:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 76,940 KB
最終ジャッジ日時 2023-09-14 07:27:50
合計ジャッジ時間 2,866 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,952 KB
testcase_01 AC 73 ms
71,672 KB
testcase_02 AC 72 ms
71,524 KB
testcase_03 AC 71 ms
71,644 KB
testcase_04 AC 72 ms
71,700 KB
testcase_05 AC 73 ms
71,716 KB
testcase_06 AC 72 ms
71,548 KB
testcase_07 AC 73 ms
71,800 KB
testcase_08 AC 74 ms
71,788 KB
testcase_09 AC 81 ms
76,872 KB
testcase_10 AC 79 ms
76,432 KB
testcase_11 AC 83 ms
76,936 KB
testcase_12 AC 85 ms
76,784 KB
testcase_13 AC 87 ms
76,680 KB
testcase_14 AC 87 ms
76,808 KB
testcase_15 AC 90 ms
76,940 KB
testcase_16 AC 91 ms
76,520 KB
testcase_17 AC 72 ms
71,660 KB
testcase_18 AC 72 ms
71,668 KB
testcase_19 AC 72 ms
71,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for x in range(1, n):
    y2 = n * n - x * x
    y = int((y2+0.5)**.5)
    if y * y == y2:
        ans += 1
print(ans)
0