結果

問題 No.781 円周上の格子点の数え上げ
ユーザー 👑 rin204rin204
提出日時 2022-01-19 20:07:51
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 301 bytes
コンパイル時間 733 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 278,424 KB
最終ジャッジ日時 2024-05-02 19:53:53
合計ジャッジ時間 7,120 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
56,960 KB
testcase_01 AC 38 ms
51,584 KB
testcase_02 RE -
testcase_03 AC 39 ms
51,328 KB
testcase_04 AC 39 ms
51,840 KB
testcase_05 AC 39 ms
51,840 KB
testcase_06 AC 46 ms
58,112 KB
testcase_07 RE -
testcase_08 AC 79 ms
60,160 KB
testcase_09 RE -
testcase_10 AC 52 ms
61,440 KB
testcase_11 AC 58 ms
63,488 KB
testcase_12 AC 1,896 ms
188,768 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y = map(int, input().split())

i = 1
squ = []
while i * i <= y:
    squ.append(i * i)
    i += 1

cnt = {}
l = len(squ)
for s in [0] + squ:
    for q in squ:
        if x <= s + q <= y:
            cnt[s + q] = cnt.get(s + q, 0) + 1
            
ans = max(0, *cnt.values())
print(4 * ans)
        
0