結果

問題 No.781 円周上の格子点の数え上げ
ユーザー convexineqconvexineq
提出日時 2021-03-16 09:51:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 328 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 216,064 KB
最終ジャッジ日時 2024-04-25 10:08:29
合計ジャッジ時間 3,211 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,712 KB
testcase_01 AC 39 ms
51,712 KB
testcase_02 AC 38 ms
51,968 KB
testcase_03 AC 35 ms
51,840 KB
testcase_04 AC 39 ms
51,840 KB
testcase_05 AC 36 ms
51,712 KB
testcase_06 AC 42 ms
59,008 KB
testcase_07 AC 41 ms
59,648 KB
testcase_08 AC 261 ms
137,728 KB
testcase_09 AC 247 ms
137,728 KB
testcase_10 AC 41 ms
58,624 KB
testcase_11 AC 43 ms
59,648 KB
testcase_12 AC 296 ms
180,480 KB
testcase_13 AC 328 ms
216,064 KB
testcase_14 AC 49 ms
64,128 KB
testcase_15 AC 41 ms
57,984 KB
testcase_16 AC 40 ms
58,240 KB
testcase_17 AC 201 ms
152,704 KB
testcase_18 AC 177 ms
105,600 KB
testcase_19 AC 163 ms
107,776 KB
testcase_20 AC 159 ms
107,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

n = y
r = [0]*(n+1)
for i in range(1,n+1):
    v = i*i
    if v > n: break
    for j in range(n+1):
        if v+j*j > n: break
        r[v+j*j] += 1

print(max(r[x:y+1])*4)
0