結果

問題 No.781 円周上の格子点の数え上げ
ユーザー rlangevinrlangevin
提出日時 2023-01-12 22:14:02
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 312 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 82,288 KB
最終ジャッジ日時 2023-08-25 02:43:35
合計ジャッジ時間 5,366 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
71,560 KB
testcase_01 AC 89 ms
71,612 KB
testcase_02 AC 90 ms
71,696 KB
testcase_03 AC 88 ms
71,696 KB
testcase_04 AC 91 ms
71,684 KB
testcase_05 AC 90 ms
71,892 KB
testcase_06 AC 107 ms
79,276 KB
testcase_07 AC 116 ms
82,288 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *

X, Y = map(int, input().split())
L = []
D = defaultdict(int)
i = 1
while i * i <= Y:
    L.append(i * i)
    D[i * i] += 1
    i += 1

for a in L:
    for b in L:
        D[a + b] += 1
        
ans = 0
for k, v in D.items():
    if X <= k <= Y:
        ans = max(ans, v)
print(ans * 4)
0