結果

問題 No.1593 Perfect Distance
ユーザー convexineqconvexineq
提出日時 2021-07-09 21:24:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 76,780 KB
最終ジャッジ日時 2023-09-14 07:34:45
合計ジャッジ時間 2,931 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,208 KB
testcase_01 AC 75 ms
71,764 KB
testcase_02 AC 77 ms
71,668 KB
testcase_03 AC 77 ms
71,672 KB
testcase_04 AC 77 ms
71,748 KB
testcase_05 AC 77 ms
71,800 KB
testcase_06 AC 76 ms
71,748 KB
testcase_07 AC 77 ms
71,668 KB
testcase_08 AC 77 ms
71,836 KB
testcase_09 AC 84 ms
76,580 KB
testcase_10 AC 83 ms
76,680 KB
testcase_11 AC 85 ms
76,780 KB
testcase_12 AC 90 ms
76,624 KB
testcase_13 AC 91 ms
76,620 KB
testcase_14 AC 92 ms
76,368 KB
testcase_15 AC 93 ms
76,600 KB
testcase_16 AC 97 ms
76,360 KB
testcase_17 AC 78 ms
71,964 KB
testcase_18 AC 78 ms
71,868 KB
testcase_19 AC 78 ms
71,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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