結果

問題 No.781 円周上の格子点の数え上げ
ユーザー ixTL255ixTL255
提出日時 2019-02-06 01:04:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 243 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 86,348 KB
最終ジャッジ日時 2023-08-31 00:01:10
合計ジャッジ時間 5,535 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
86,240 KB
testcase_01 AC 114 ms
86,312 KB
testcase_02 AC 113 ms
86,160 KB
testcase_03 AC 114 ms
86,100 KB
testcase_04 AC 115 ms
86,328 KB
testcase_05 AC 115 ms
86,256 KB
testcase_06 AC 183 ms
86,216 KB
testcase_07 AC 279 ms
86,304 KB
testcase_08 RE -
testcase_09 TLE -
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] * 10000000
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