結果

問題 No.800 四平方定理
ユーザー URechaRecha
提出日時 2019-09-05 17:07:55
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 226 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 78,592 KB
最終ジャッジ日時 2024-06-11 20:01:15
合計ジャッジ時間 31,543 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 TLE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D = map(int,input().split())
s = [i**2 for i in range(1,N+1)]
c = [0]*8000001
for w in s:
    for z in s:
        a = w-z+D
        if a >=1:
            c[a] +=1
A = 0
for x in s:
    for y in s:
        A +=c[x+y]
print(A)
0