結果

問題 No.781 円周上の格子点の数え上げ
コンテスト
ユーザー rin204
提出日時 2022-01-19 20:11:22
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 320 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 182 ms
コンパイル使用メモリ 85,376 KB
実行使用メモリ 278,468 KB
最終ジャッジ日時 2026-05-17 07:04:25
合計ジャッジ時間 6,630 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

x, y = map(int, input().split())

i = 1
squ = []
while i * i <= y:
    squ.append(i * i)
    i += 1

cnt = {}
l = len(squ)
ans = 0
for s in [0] + squ:
    for q in squ:
        if x <= s + q <= y:
            cnt[s + q] = cnt.get(s + q, 0) + 1
            ans = max(ans, cnt[s + q])
            
print(4 * ans)
        
0