結果

問題 No.1318 ABCD quadruplets
ユーザー convexineqconvexineq
提出日時 2020-12-15 22:17:31
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 399 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 81,668 KB
実行使用メモリ 80,660 KB
最終ジャッジ日時 2023-10-20 06:50:01
合計ジャッジ時間 5,325 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,560 KB
testcase_01 AC 35 ms
53,432 KB
testcase_02 AC 34 ms
53,432 KB
testcase_03 AC 34 ms
53,432 KB
testcase_04 AC 34 ms
53,432 KB
testcase_05 AC 34 ms
53,432 KB
testcase_06 AC 35 ms
53,432 KB
testcase_07 AC 34 ms
53,432 KB
testcase_08 AC 34 ms
53,432 KB
testcase_09 AC 35 ms
53,432 KB
testcase_10 AC 40 ms
59,780 KB
testcase_11 AC 37 ms
53,432 KB
testcase_12 AC 35 ms
53,432 KB
testcase_13 AC 550 ms
75,784 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 #

n,m = map(int,input().split())
ans = [0]*(n+1)
for a in range(m+1):
    v0 = a*a
    for b in range(m+1):
        v1 = v0 + b*(a+b)
        if v1 > n: break
        for c in range(m+1):
            v2 = v1 + c*(a+b+c)
            if v2 > n: break
            for d in range(m+1):
                v3 = v2 + d*(a+b+c+d)
                if v3 <= n:
                    ans[v3] += 1
print(*ans,sep="\n")
0