結果

問題 No.1330 Multiply or Divide
ユーザー c-yanc-yan
提出日時 2021-01-08 22:20:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 32,764 KB
最終ジャッジ日時 2024-04-28 03:37:42
合計ジャッジ時間 4,577 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 112 ms
31,080 KB
testcase_02 WA -
testcase_03 AC 24 ms
10,496 KB
testcase_04 AC 23 ms
10,880 KB
testcase_05 AC 24 ms
10,880 KB
testcase_06 AC 92 ms
14,608 KB
testcase_07 WA -
testcase_08 AC 120 ms
32,700 KB
testcase_09 AC 125 ms
32,516 KB
testcase_10 AC 118 ms
32,632 KB
testcase_11 AC 113 ms
32,536 KB
testcase_12 AC 119 ms
32,640 KB
testcase_13 AC 24 ms
10,880 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 23 ms
10,624 KB
testcase_17 WA -
testcase_18 AC 114 ms
32,512 KB
testcase_19 AC 115 ms
32,764 KB
testcase_20 AC 112 ms
32,516 KB
testcase_21 AC 111 ms
32,636 KB
testcase_22 AC 110 ms
32,640 KB
testcase_23 AC 109 ms
32,676 KB
testcase_24 AC 24 ms
10,624 KB
testcase_25 AC 24 ms
10,752 KB
testcase_26 AC 24 ms
10,752 KB
testcase_27 AC 24 ms
10,624 KB
testcase_28 AC 24 ms
10,624 KB
testcase_29 AC 23 ms
10,752 KB
testcase_30 AC 24 ms
10,624 KB
testcase_31 AC 24 ms
10,752 KB
testcase_32 AC 24 ms
10,880 KB
testcase_33 AC 24 ms
10,752 KB
testcase_34 AC 92 ms
27,000 KB
testcase_35 AC 42 ms
15,160 KB
testcase_36 AC 80 ms
25,276 KB
testcase_37 AC 75 ms
23,512 KB
testcase_38 AC 54 ms
18,608 KB
testcase_39 AC 47 ms
16,232 KB
testcase_40 AC 51 ms
17,352 KB
testcase_41 AC 39 ms
14,216 KB
testcase_42 AC 72 ms
22,640 KB
testcase_43 AC 79 ms
24,620 KB
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x):
    while x % P == 0:
        x //= P
    return x

N, M, P, *A = map(int, open(0).read().split())

max_A = max(A)
t = max(map(f, A))

if t in [0, 1]:
    print(-1)
    exit()

x = 1
result = 1
while x * max_A <= M:
    x *= t
    result += 1
print(result)
0