結果

問題 No.1593 Perfect Distance
ユーザー rin204rin204
提出日時 2021-07-09 21:49:47
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 131 bytes
コンパイル時間 274 ms
使用メモリ 81,564 KB
最終ジャッジ日時 2023-02-01 22:59:45
合計ジャッジ時間 3,341 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 82 ms
75,432 KB
testcase_01 AC 83 ms
76,200 KB
testcase_02 AC 83 ms
76,012 KB
testcase_03 AC 82 ms
76,092 KB
testcase_04 AC 83 ms
76,192 KB
testcase_05 AC 81 ms
75,860 KB
testcase_06 AC 82 ms
76,108 KB
testcase_07 AC 82 ms
76,140 KB
testcase_08 AC 84 ms
76,200 KB
testcase_09 AC 98 ms
81,156 KB
testcase_10 AC 92 ms
81,504 KB
testcase_11 AC 95 ms
81,168 KB
testcase_12 AC 98 ms
81,272 KB
testcase_13 AC 98 ms
81,564 KB
testcase_14 AC 100 ms
81,336 KB
testcase_15 AC 103 ms
81,312 KB
testcase_16 AC 104 ms
81,288 KB
testcase_17 AC 83 ms
76,016 KB
testcase_18 AC 83 ms
76,112 KB
testcase_19 AC 82 ms
76,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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