結果

問題 No.1593 Perfect Distance
ユーザー zkouzkou
提出日時 2021-07-09 22:23:47
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 87,372 KB
実行使用メモリ 76,876 KB
最終ジャッジ日時 2023-09-14 09:38:52
合計ジャッジ時間 2,755 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,448 KB
testcase_01 AC 68 ms
71,812 KB
testcase_02 AC 70 ms
71,652 KB
testcase_03 AC 68 ms
71,692 KB
testcase_04 AC 69 ms
71,668 KB
testcase_05 AC 68 ms
71,772 KB
testcase_06 AC 69 ms
71,556 KB
testcase_07 AC 69 ms
71,728 KB
testcase_08 AC 71 ms
71,820 KB
testcase_09 AC 78 ms
76,804 KB
testcase_10 AC 75 ms
76,788 KB
testcase_11 AC 84 ms
76,876 KB
testcase_12 AC 83 ms
76,864 KB
testcase_13 AC 84 ms
76,544 KB
testcase_14 AC 85 ms
76,564 KB
testcase_15 AC 88 ms
76,548 KB
testcase_16 AC 91 ms
76,500 KB
testcase_17 AC 69 ms
71,892 KB
testcase_18 AC 70 ms
71,840 KB
testcase_19 AC 68 ms
71,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

ans = 0
for x in range(1, N):
    ysq = N ** 2 - x ** 2
    y = int(ysq ** 0.5 + 0.5)
    if y ** 2 == ysq:
        ans += 1

print(ans)
0