結果

問題 No.781 円周上の格子点の数え上げ
ユーザー toyuzukotoyuzuko
提出日時 2020-06-02 18:19:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 423 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 218,512 KB
最終ジャッジ日時 2024-05-03 08:02:20
合計ジャッジ時間 9,340 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 369 ms
140,272 KB
testcase_01 AC 371 ms
140,192 KB
testcase_02 AC 386 ms
139,920 KB
testcase_03 AC 370 ms
140,396 KB
testcase_04 AC 366 ms
140,080 KB
testcase_05 AC 371 ms
140,300 KB
testcase_06 AC 386 ms
139,936 KB
testcase_07 AC 371 ms
140,092 KB
testcase_08 AC 377 ms
140,348 KB
testcase_09 AC 375 ms
140,284 KB
testcase_10 AC 370 ms
140,780 KB
testcase_11 AC 369 ms
140,732 KB
testcase_12 AC 396 ms
183,284 KB
testcase_13 AC 423 ms
218,512 KB
testcase_14 AC 369 ms
141,688 KB
testcase_15 AC 363 ms
140,056 KB
testcase_16 AC 372 ms
140,348 KB
testcase_17 AC 401 ms
186,696 KB
testcase_18 AC 371 ms
140,276 KB
testcase_19 AC 375 ms
140,408 KB
testcase_20 AC 371 ms
140,032 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