結果

問題 No.781 円周上の格子点の数え上げ
ユーザー toyuzukotoyuzuko
提出日時 2020-06-02 18:19:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 545 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 1,572 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 232,412 KB
最終ジャッジ日時 2023-08-15 21:29:42
合計ジャッジ時間 11,151 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 404 ms
154,412 KB
testcase_01 AC 402 ms
154,348 KB
testcase_02 AC 401 ms
154,452 KB
testcase_03 AC 394 ms
154,540 KB
testcase_04 AC 427 ms
154,288 KB
testcase_05 AC 437 ms
154,544 KB
testcase_06 AC 437 ms
154,264 KB
testcase_07 AC 396 ms
154,548 KB
testcase_08 AC 438 ms
154,432 KB
testcase_09 AC 440 ms
154,396 KB
testcase_10 AC 413 ms
154,684 KB
testcase_11 AC 387 ms
154,804 KB
testcase_12 AC 429 ms
196,956 KB
testcase_13 AC 545 ms
232,412 KB
testcase_14 AC 440 ms
155,336 KB
testcase_15 AC 392 ms
154,472 KB
testcase_16 AC 401 ms
154,544 KB
testcase_17 AC 423 ms
200,840 KB
testcase_18 AC 424 ms
154,468 KB
testcase_19 AC 396 ms
154,428 KB
testcase_20 AC 395 ms
154,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X, Y = map(int, input().split())

square = [i ** 2 for i in range(4000)]
count = [0 for i in range(10**7 + 1)]

for i in range(4000):
    for j in range(1, 4000):
        k = square[i] + square[j]
        if k <= 10**7:
            count[k] += 1

print(max(count[X: Y + 1]) * 4)
0