結果

問題 No.781 円周上の格子点の数え上げ
ユーザー ixTL255ixTL255
提出日時 2019-02-06 01:32:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 243 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 90,924 KB
最終ジャッジ日時 2023-08-31 00:01:42
合計ジャッジ時間 4,987 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
90,760 KB
testcase_01 AC 113 ms
86,172 KB
testcase_02 AC 114 ms
86,332 KB
testcase_03 AC 115 ms
86,140 KB
testcase_04 AC 115 ms
86,156 KB
testcase_05 AC 116 ms
86,168 KB
testcase_06 AC 188 ms
86,192 KB
testcase_07 AC 271 ms
86,128 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 #

import math
a,b = map(int,input().split())
cnt = [0] * 10000010
r = int(math.sqrt(b))
for i in range(-r,r+1):
	for j in range(-r,r+1):
		if i*i + j*j <= b:
			cnt[i*i + j*j]+=1
ans = 0
for i in range(a,b+1):
	ans = max(ans, cnt[i])
print (ans)
0