結果

問題 No.1593 Perfect Distance
ユーザー Fullmoon85072Fullmoon85072
提出日時 2021-11-28 15:08:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 76,996 KB
最終ジャッジ日時 2023-09-14 01:35:00
合計ジャッジ時間 2,917 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,404 KB
testcase_01 AC 70 ms
71,416 KB
testcase_02 AC 69 ms
71,712 KB
testcase_03 AC 70 ms
71,556 KB
testcase_04 AC 74 ms
71,808 KB
testcase_05 AC 72 ms
71,656 KB
testcase_06 AC 73 ms
71,284 KB
testcase_07 AC 74 ms
71,380 KB
testcase_08 AC 72 ms
71,472 KB
testcase_09 AC 77 ms
76,868 KB
testcase_10 AC 75 ms
76,784 KB
testcase_11 AC 79 ms
76,528 KB
testcase_12 AC 80 ms
76,996 KB
testcase_13 AC 80 ms
76,872 KB
testcase_14 AC 82 ms
76,916 KB
testcase_15 AC 82 ms
76,736 KB
testcase_16 AC 80 ms
76,608 KB
testcase_17 AC 71 ms
71,852 KB
testcase_18 AC 72 ms
71,524 KB
testcase_19 AC 71 ms
71,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())

twoN = math.pow(N, 2)

count = 0
for x in range(N):
    y = math.sqrt(twoN - math.pow(x+1, 2))
    if y > 1 and y == int(y):
        count += 1
print(count)
0