結果

問題 No.781 円周上の格子点の数え上げ
ユーザー stngstng
提出日時 2022-06-12 17:50:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 645 ms
コンパイル使用メモリ 81,744 KB
実行使用メモリ 216,616 KB
最終ジャッジ日時 2023-10-24 11:49:25
合計ジャッジ時間 3,750 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 38 ms
53,672 KB
testcase_02 AC 36 ms
53,672 KB
testcase_03 WA -
testcase_04 AC 36 ms
53,672 KB
testcase_05 WA -
testcase_06 AC 41 ms
60,544 KB
testcase_07 AC 42 ms
61,048 KB
testcase_08 AC 242 ms
137,820 KB
testcase_09 AC 248 ms
137,812 KB
testcase_10 AC 44 ms
60,492 KB
testcase_11 AC 41 ms
61,120 KB
testcase_12 AC 247 ms
181,104 KB
testcase_13 AC 272 ms
216,616 KB
testcase_14 AC 48 ms
65,744 KB
testcase_15 AC 40 ms
60,260 KB
testcase_16 AC 40 ms
60,204 KB
testcase_17 AC 165 ms
152,992 KB
testcase_18 AC 139 ms
106,488 KB
testcase_19 AC 145 ms
107,872 KB
testcase_20 AC 162 ms
107,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0
dp = [0]*(y+1)

Y = int(y**0.5+50)
for i in range(1,Y+1):
    tmp = i**2
    for j in range(1,Y+1):
        idx = tmp+j**2
        if idx > y:
            break
        dp[idx] += 1
#print(dp)
print(max(dp[x:y+1])*4)
0