結果

問題 No.1330 Multiply or Divide
ユーザー convexineqconvexineq
提出日時 2021-01-09 20:14:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 979 ms
コンパイル使用メモリ 81,380 KB
実行使用メモリ 116,884 KB
最終ジャッジ日時 2024-04-29 08:53:18
合計ジャッジ時間 5,793 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 99 ms
112,016 KB
testcase_02 WA -
testcase_03 AC 38 ms
52,304 KB
testcase_04 AC 41 ms
60,208 KB
testcase_05 AC 37 ms
53,236 KB
testcase_06 AC 693 ms
107,960 KB
testcase_07 WA -
testcase_08 AC 112 ms
116,852 KB
testcase_09 AC 114 ms
116,872 KB
testcase_10 AC 106 ms
116,684 KB
testcase_11 AC 110 ms
116,884 KB
testcase_12 AC 110 ms
116,664 KB
testcase_13 AC 37 ms
51,748 KB
testcase_14 AC 37 ms
52,116 KB
testcase_15 AC 37 ms
53,020 KB
testcase_16 AC 35 ms
52,796 KB
testcase_17 AC 38 ms
52,668 KB
testcase_18 AC 93 ms
114,180 KB
testcase_19 AC 95 ms
114,648 KB
testcase_20 AC 97 ms
114,024 KB
testcase_21 AC 96 ms
113,184 KB
testcase_22 AC 95 ms
114,292 KB
testcase_23 AC 97 ms
114,860 KB
testcase_24 AC 38 ms
52,024 KB
testcase_25 AC 37 ms
52,004 KB
testcase_26 AC 38 ms
52,516 KB
testcase_27 AC 36 ms
51,692 KB
testcase_28 AC 38 ms
52,264 KB
testcase_29 AC 37 ms
52,088 KB
testcase_30 AC 38 ms
52,404 KB
testcase_31 AC 37 ms
53,176 KB
testcase_32 AC 37 ms
52,736 KB
testcase_33 AC 38 ms
52,524 KB
testcase_34 AC 83 ms
100,860 KB
testcase_35 AC 52 ms
70,744 KB
testcase_36 AC 79 ms
97,024 KB
testcase_37 AC 75 ms
93,004 KB
testcase_38 AC 62 ms
80,352 KB
testcase_39 AC 55 ms
71,848 KB
testcase_40 AC 58 ms
75,704 KB
testcase_41 AC 50 ms
67,288 KB
testcase_42 AC 71 ms
88,840 KB
testcase_43 AC 76 ms
93,848 KB
testcase_44 AC 116 ms
107,688 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,p,*a = map(int,open(0).read().split())
t = [1]*n
for i in range(n):
    while a[i]%p==0:
        a[i] //= p
        t[i] += 1
m = m//max(a)+1
dp = [1]*1050
for i in range(999):
    if dp[i] >= m: break
    for ai,ti in zip(a,t):
        dp[i+ti] = max(dp[i+ti],dp[i]*ai)
else: i = -2
print(i+1)
0