結果

問題 No.781 円周上の格子点の数え上げ
ユーザー 双六双六
提出日時 2020-08-08 03:12:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,315 ms / 2,000 ms
コード長 504 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 81,836 KB
実行使用メモリ 450,096 KB
最終ジャッジ日時 2023-10-25 21:17:52
合計ジャッジ時間 28,283 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,291 ms
450,088 KB
testcase_01 AC 1,218 ms
450,088 KB
testcase_02 AC 1,239 ms
450,088 KB
testcase_03 AC 1,315 ms
450,088 KB
testcase_04 AC 1,266 ms
450,088 KB
testcase_05 AC 1,302 ms
450,088 KB
testcase_06 AC 1,267 ms
450,088 KB
testcase_07 AC 1,231 ms
450,088 KB
testcase_08 AC 1,194 ms
450,088 KB
testcase_09 AC 1,291 ms
450,088 KB
testcase_10 AC 1,242 ms
450,096 KB
testcase_11 AC 1,178 ms
450,096 KB
testcase_12 AC 1,145 ms
450,096 KB
testcase_13 AC 1,167 ms
450,096 KB
testcase_14 AC 1,104 ms
450,092 KB
testcase_15 AC 1,100 ms
450,088 KB
testcase_16 AC 1,166 ms
450,088 KB
testcase_17 AC 1,171 ms
450,092 KB
testcase_18 AC 1,152 ms
450,088 KB
testcase_19 AC 1,104 ms
450,088 KB
testcase_20 AC 1,129 ms
450,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	X, Y = getlist()
	L = [0] * (5 * 10 ** 7)
	for i in range(-(4 * 10 ** 3), 4 * 10 ** 3):
		for j in range(-(4 * 10 ** 3), 4 * 10 ** 3):
			L[i ** 2 + j ** 2] += 1

	ans = 0
	for i in range(X, Y + 1):
		ans = max(ans, L[i])

	print(ans)
	
if __name__ == '__main__':
	main()
0