結果

問題 No.1532 Different Products
ユーザー convexineqconvexineq
提出日時 2021-06-04 22:58:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,072 ms / 4,000 ms
コード長 240 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 167,696 KB
最終ジャッジ日時 2023-08-12 16:32:01
合計ジャッジ時間 38,804 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
71,624 KB
testcase_01 AC 220 ms
90,592 KB
testcase_02 AC 93 ms
71,648 KB
testcase_03 AC 91 ms
71,532 KB
testcase_04 AC 91 ms
71,524 KB
testcase_05 AC 93 ms
71,756 KB
testcase_06 AC 94 ms
71,408 KB
testcase_07 AC 102 ms
77,628 KB
testcase_08 AC 105 ms
77,360 KB
testcase_09 AC 124 ms
81,544 KB
testcase_10 AC 215 ms
94,192 KB
testcase_11 AC 181 ms
93,420 KB
testcase_12 AC 440 ms
119,460 KB
testcase_13 AC 246 ms
99,692 KB
testcase_14 AC 840 ms
152,580 KB
testcase_15 AC 104 ms
77,420 KB
testcase_16 AC 256 ms
91,728 KB
testcase_17 AC 189 ms
95,200 KB
testcase_18 AC 146 ms
89,484 KB
testcase_19 AC 407 ms
116,624 KB
testcase_20 AC 859 ms
148,224 KB
testcase_21 AC 335 ms
95,164 KB
testcase_22 AC 258 ms
96,296 KB
testcase_23 AC 163 ms
93,688 KB
testcase_24 AC 719 ms
143,952 KB
testcase_25 AC 414 ms
118,672 KB
testcase_26 AC 125 ms
82,704 KB
testcase_27 AC 405 ms
98,656 KB
testcase_28 AC 301 ms
94,836 KB
testcase_29 AC 311 ms
93,576 KB
testcase_30 AC 540 ms
125,516 KB
testcase_31 AC 536 ms
126,388 KB
testcase_32 AC 636 ms
132,820 KB
testcase_33 AC 492 ms
121,236 KB
testcase_34 AC 716 ms
143,840 KB
testcase_35 AC 633 ms
131,940 KB
testcase_36 AC 735 ms
144,772 KB
testcase_37 AC 228 ms
89,064 KB
testcase_38 AC 800 ms
147,116 KB
testcase_39 AC 714 ms
138,020 KB
testcase_40 AC 705 ms
139,580 KB
testcase_41 AC 950 ms
159,832 KB
testcase_42 AC 860 ms
158,748 KB
testcase_43 AC 898 ms
154,116 KB
testcase_44 AC 994 ms
167,536 KB
testcase_45 AC 1,049 ms
165,948 KB
testcase_46 AC 941 ms
161,524 KB
testcase_47 AC 973 ms
166,260 KB
testcase_48 AC 1,006 ms
167,696 KB
testcase_49 AC 1,013 ms
165,588 KB
testcase_50 AC 1,002 ms
167,452 KB
testcase_51 AC 1,029 ms
167,660 KB
testcase_52 AC 1,055 ms
163,584 KB
testcase_53 AC 1,072 ms
166,244 KB
testcase_54 AC 996 ms
163,292 KB
testcase_55 AC 1,024 ms
162,660 KB
testcase_56 AC 966 ms
161,360 KB
testcase_57 AC 1,055 ms
162,324 KB
testcase_58 AC 983 ms
167,288 KB
testcase_59 AC 962 ms
158,336 KB
testcase_60 AC 1,024 ms
165,720 KB
testcase_61 AC 91 ms
71,680 KB
testcase_62 AC 91 ms
71,552 KB
testcase_63 AC 1,036 ms
167,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
from collections import defaultdict
dp = defaultdict(int)
dp[k] = 2
for i in range(2,n+1):
    ndp = dp.copy()
    for k,v in dp.items():
        ndp[k//i] += v
    dp = ndp
dp[0] = 0
print(sum(dp.values())-1)
0