結果

問題 No.1593 Perfect Distance
ユーザー wesoweeenwesoweeen
提出日時 2021-07-11 13:57:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 359 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,772 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-14 20:09:41
合計ジャッジ時間 5,008 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,820 KB
testcase_01 AC 15 ms
7,888 KB
testcase_02 AC 17 ms
7,812 KB
testcase_03 AC 17 ms
7,804 KB
testcase_04 AC 17 ms
7,804 KB
testcase_05 AC 17 ms
7,816 KB
testcase_06 AC 1,151 ms
8,324 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    l = []
    num = N ** 2
    x_list = [n ** 2 for n in range(1, num)]
    y_list = [m ** 2 for m in range(1, num)]
    for i in range(len(x_list)):
        for j in range(len(y_list)):
            if x_list[i] + y_list[j] == num:
                l.append(x_list[i])
    print(len(l))


if __name__ == '__main__':
    main()
0