結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
90,760 KB
testcase_01 WA -
testcase_02 AC 114 ms
86,164 KB
testcase_03 AC 114 ms
86,100 KB
testcase_04 WA -
testcase_05 AC 115 ms
86,168 KB
testcase_06 AC 132 ms
86,164 KB
testcase_07 AC 154 ms
86,332 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] * 10000001
r = int(math.sqrt(b))
for i in range(r):
	for j in range(1,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*4)
0