結果

問題 No.1593 Perfect Distance
ユーザー TadaTada
提出日時 2021-07-09 21:28:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 152 bytes
コンパイル時間 791 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 76,320 KB
最終ジャッジ日時 2023-09-14 07:48:36
合計ジャッジ時間 3,008 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,096 KB
testcase_01 AC 65 ms
71,428 KB
testcase_02 AC 70 ms
71,360 KB
testcase_03 AC 65 ms
71,348 KB
testcase_04 AC 65 ms
71,300 KB
testcase_05 AC 64 ms
71,344 KB
testcase_06 AC 65 ms
71,268 KB
testcase_07 AC 63 ms
71,432 KB
testcase_08 AC 66 ms
71,284 KB
testcase_09 AC 75 ms
76,128 KB
testcase_10 AC 71 ms
75,916 KB
testcase_11 AC 74 ms
76,320 KB
testcase_12 AC 76 ms
76,132 KB
testcase_13 AC 77 ms
76,172 KB
testcase_14 AC 81 ms
76,140 KB
testcase_15 AC 82 ms
76,188 KB
testcase_16 AC 80 ms
76,168 KB
testcase_17 AC 68 ms
71,208 KB
testcase_18 AC 71 ms
71,420 KB
testcase_19 AC 70 ms
71,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N=int(input())


ans=0
for i in range(1,N):
    a=i
    b2=N*N-a*a
    b=round(math.sqrt(b2))
    if a*a+b*b==N*N:
        ans+=1
print(ans)
0