結果

問題 No.1330 Multiply or Divide
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-09-13 12:40:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 430 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 122,484 KB
最終ジャッジ日時 2023-09-13 12:41:27
合計ジャッジ時間 9,418 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 198 ms
122,484 KB
testcase_02 AC 104 ms
72,760 KB
testcase_03 AC 111 ms
72,900 KB
testcase_04 AC 105 ms
72,836 KB
testcase_05 AC 106 ms
72,880 KB
testcase_06 AC 153 ms
119,168 KB
testcase_07 WA -
testcase_08 AC 179 ms
116,324 KB
testcase_09 AC 182 ms
116,368 KB
testcase_10 AC 193 ms
116,300 KB
testcase_11 AC 181 ms
116,344 KB
testcase_12 AC 177 ms
116,244 KB
testcase_13 AC 105 ms
72,884 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 114 ms
72,832 KB
testcase_17 WA -
testcase_18 AC 172 ms
115,992 KB
testcase_19 AC 172 ms
116,080 KB
testcase_20 AC 169 ms
116,308 KB
testcase_21 AC 170 ms
116,116 KB
testcase_22 AC 172 ms
116,172 KB
testcase_23 AC 171 ms
115,844 KB
testcase_24 AC 113 ms
72,640 KB
testcase_25 AC 105 ms
72,900 KB
testcase_26 AC 105 ms
72,792 KB
testcase_27 AC 103 ms
72,812 KB
testcase_28 AC 115 ms
72,760 KB
testcase_29 AC 105 ms
72,636 KB
testcase_30 AC 111 ms
72,732 KB
testcase_31 AC 104 ms
72,684 KB
testcase_32 AC 105 ms
72,620 KB
testcase_33 AC 104 ms
72,812 KB
testcase_34 AC 152 ms
111,920 KB
testcase_35 AC 120 ms
84,752 KB
testcase_36 AC 148 ms
107,892 KB
testcase_37 AC 144 ms
104,172 KB
testcase_38 AC 135 ms
93,048 KB
testcase_39 AC 122 ms
86,128 KB
testcase_40 AC 126 ms
89,152 KB
testcase_41 AC 119 ms
81,616 KB
testcase_42 AC 142 ms
100,816 KB
testcase_43 AC 146 ms
104,472 KB
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline


N,M,P = map(int,input().split())
A = list(map(int,input().split()))
B = []

for a in A:
    while a%P==0:
        a //= P
    B.append(a)

L = max(B)
if max(A)>M:
    print(1)
    exit()

if L==1:
    print(-1)
    exit()
now = 1
cnt = 0
while now <= M:
    cnt += 1
    now *= L
print(cnt)
0