結果

問題 No.781 円周上の格子点の数え上げ
ユーザー vwxyzvwxyz
提出日時 2024-04-06 05:34:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 260,616 KB
最終ジャッジ日時 2024-04-06 05:34:38
合計ジャッジ時間 4,696 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
60,392 KB
testcase_01 AC 41 ms
53,588 KB
testcase_02 AC 40 ms
53,588 KB
testcase_03 AC 40 ms
53,588 KB
testcase_04 AC 41 ms
53,588 KB
testcase_05 AC 40 ms
53,588 KB
testcase_06 AC 60 ms
67,856 KB
testcase_07 AC 77 ms
75,124 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 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