結果

問題 No.1532 Different Products
ユーザー convexineqconvexineq
提出日時 2021-06-04 23:07:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,089 ms / 4,000 ms
コード長 244 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 154,356 KB
最終ジャッジ日時 2024-04-30 11:45:41
合計ジャッジ時間 38,006 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
54,148 KB
testcase_01 AC 159 ms
93,324 KB
testcase_02 AC 42 ms
54,928 KB
testcase_03 AC 42 ms
54,624 KB
testcase_04 AC 46 ms
54,644 KB
testcase_05 AC 41 ms
55,028 KB
testcase_06 AC 43 ms
54,496 KB
testcase_07 AC 51 ms
61,592 KB
testcase_08 AC 52 ms
64,028 KB
testcase_09 AC 70 ms
74,668 KB
testcase_10 AC 166 ms
93,832 KB
testcase_11 AC 131 ms
86,912 KB
testcase_12 AC 454 ms
137,728 KB
testcase_13 AC 201 ms
104,696 KB
testcase_14 AC 866 ms
147,580 KB
testcase_15 AC 53 ms
63,812 KB
testcase_16 AC 211 ms
95,672 KB
testcase_17 AC 132 ms
87,340 KB
testcase_18 AC 101 ms
87,560 KB
testcase_19 AC 420 ms
140,148 KB
testcase_20 AC 869 ms
149,308 KB
testcase_21 AC 288 ms
99,352 KB
testcase_22 AC 220 ms
101,076 KB
testcase_23 AC 119 ms
88,412 KB
testcase_24 AC 795 ms
144,104 KB
testcase_25 AC 407 ms
126,224 KB
testcase_26 AC 76 ms
78,304 KB
testcase_27 AC 385 ms
102,324 KB
testcase_28 AC 269 ms
100,212 KB
testcase_29 AC 268 ms
97,720 KB
testcase_30 AC 562 ms
135,104 KB
testcase_31 AC 571 ms
145,956 KB
testcase_32 AC 648 ms
143,052 KB
testcase_33 AC 493 ms
123,848 KB
testcase_34 AC 779 ms
145,716 KB
testcase_35 AC 643 ms
144,912 KB
testcase_36 AC 767 ms
144,648 KB
testcase_37 AC 174 ms
92,740 KB
testcase_38 AC 824 ms
144,264 KB
testcase_39 AC 731 ms
145,224 KB
testcase_40 AC 763 ms
143,436 KB
testcase_41 AC 1,035 ms
150,028 KB
testcase_42 AC 906 ms
151,592 KB
testcase_43 AC 973 ms
148,688 KB
testcase_44 AC 1,080 ms
152,032 KB
testcase_45 AC 1,047 ms
150,776 KB
testcase_46 AC 1,024 ms
150,400 KB
testcase_47 AC 1,074 ms
151,380 KB
testcase_48 AC 1,061 ms
150,624 KB
testcase_49 AC 1,060 ms
151,592 KB
testcase_50 AC 1,065 ms
151,912 KB
testcase_51 AC 1,061 ms
151,176 KB
testcase_52 AC 1,026 ms
148,936 KB
testcase_53 AC 1,061 ms
153,736 KB
testcase_54 AC 1,019 ms
149,120 KB
testcase_55 AC 1,012 ms
151,164 KB
testcase_56 AC 998 ms
150,408 KB
testcase_57 AC 1,007 ms
146,588 KB
testcase_58 AC 1,089 ms
149,336 KB
testcase_59 AC 991 ms
150,744 KB
testcase_60 AC 1,048 ms
154,356 KB
testcase_61 AC 42 ms
53,644 KB
testcase_62 AC 42 ms
54,660 KB
testcase_63 AC 1,019 ms
151,048 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