結果

問題 No.1330 Multiply or Divide
ユーザー c-yanc-yan
提出日時 2021-01-08 22:24:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,768 KB
最終ジャッジ日時 2024-04-28 03:44:09
合計ジャッジ時間 5,191 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 127 ms
30,952 KB
testcase_02 WA -
testcase_03 AC 25 ms
11,008 KB
testcase_04 AC 26 ms
10,880 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 98 ms
14,488 KB
testcase_07 WA -
testcase_08 AC 128 ms
32,516 KB
testcase_09 AC 135 ms
32,640 KB
testcase_10 AC 127 ms
32,516 KB
testcase_11 AC 122 ms
32,644 KB
testcase_12 AC 127 ms
32,516 KB
testcase_13 AC 26 ms
10,880 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 26 ms
10,752 KB
testcase_17 WA -
testcase_18 AC 124 ms
32,516 KB
testcase_19 AC 120 ms
32,768 KB
testcase_20 AC 120 ms
32,512 KB
testcase_21 AC 120 ms
32,644 KB
testcase_22 AC 124 ms
32,516 KB
testcase_23 AC 121 ms
32,676 KB
testcase_24 AC 27 ms
10,624 KB
testcase_25 AC 26 ms
10,624 KB
testcase_26 AC 26 ms
10,880 KB
testcase_27 AC 26 ms
10,624 KB
testcase_28 AC 28 ms
10,880 KB
testcase_29 AC 26 ms
10,752 KB
testcase_30 AC 27 ms
10,624 KB
testcase_31 AC 25 ms
10,880 KB
testcase_32 AC 25 ms
10,880 KB
testcase_33 AC 25 ms
10,880 KB
testcase_34 AC 96 ms
27,004 KB
testcase_35 AC 46 ms
15,292 KB
testcase_36 AC 90 ms
25,280 KB
testcase_37 AC 81 ms
23,644 KB
testcase_38 AC 60 ms
18,612 KB
testcase_39 AC 49 ms
16,320 KB
testcase_40 AC 52 ms
17,480 KB
testcase_41 AC 40 ms
13,964 KB
testcase_42 AC 79 ms
22,512 KB
testcase_43 AC 90 ms
24,628 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 = 0
while True:
    result += 1
    if x * max_A > M:
        break
    x *= t
print(result)
0