結果

問題 No.1593 Perfect Distance
ユーザー wesoweeenwesoweeen
提出日時 2021-07-11 13:58:21
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 359 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 87,288 KB
実行使用メモリ 81,768 KB
最終ジャッジ日時 2023-09-14 20:09:46
合計ジャッジ時間 4,564 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,260 KB
testcase_01 AC 70 ms
71,336 KB
testcase_02 AC 71 ms
71,284 KB
testcase_03 AC 72 ms
71,112 KB
testcase_04 AC 75 ms
75,324 KB
testcase_05 AC 73 ms
75,212 KB
testcase_06 AC 132 ms
76,296 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