結果

問題 No.1318 ABCD quadruplets
ユーザー 👑 KazunKazun
提出日時 2020-12-15 00:15:28
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 341 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 81,764 KB
実行使用メモリ 80,848 KB
最終ジャッジ日時 2023-10-20 05:19:50
合計ジャッジ時間 5,120 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
57,848 KB
testcase_01 AC 38 ms
53,500 KB
testcase_02 AC 37 ms
53,500 KB
testcase_03 AC 37 ms
53,500 KB
testcase_04 AC 37 ms
53,500 KB
testcase_05 AC 38 ms
53,500 KB
testcase_06 AC 37 ms
53,500 KB
testcase_07 AC 37 ms
53,500 KB
testcase_08 AC 37 ms
53,500 KB
testcase_09 AC 38 ms
53,500 KB
testcase_10 AC 46 ms
62,192 KB
testcase_11 AC 38 ms
53,500 KB
testcase_12 AC 37 ms
53,500 KB
testcase_13 AC 345 ms
76,392 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def g(a,b,c,d):
    return a*a+a*b+a*c+a*d+b*b+b*c+b*d+c*c+c*d+d*d


N,M=map(int,input().split())

X=[0]*(N+1)
for a in range(M+1):
    for b in range(M+1):
        for c in range(M+1):
            for d in range(M+1):
                K=g(a,b,c,d)
                if K>N:
                    break
                X[K]+=1

print(*X,sep="\n")
0