結果

問題 No.781 円周上の格子点の数え上げ
ユーザー vwxyz
提出日時 2024-04-06 05:34:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 299,700 KB
最終ジャッジ日時 2024-10-01 03:43:47
合計ジャッジ時間 4,249 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
X,Y=map(int,input().split())
Y+=1
sX=int(Y**.5)+1
sY=int(Y**.5)+1
cnt=defaultdict(int)
for x in range(-sX,sX+1):
    for y in range(-sY,sY+1):
        cnt[x*x+y*y]+=1
ans=max(cnt[i] for i in range(X,Y))
print(ans)
0