結果

問題 No.1330 Multiply or Divide
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-09-13 12:42:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 436 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 122,560 KB
最終ジャッジ日時 2023-09-13 12:42:55
合計ジャッジ時間 8,614 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 161 ms
122,560 KB
testcase_02 AC 104 ms
73,056 KB
testcase_03 AC 105 ms
72,704 KB
testcase_04 AC 104 ms
72,820 KB
testcase_05 AC 108 ms
72,876 KB
testcase_06 AC 153 ms
119,352 KB
testcase_07 WA -
testcase_08 AC 177 ms
116,512 KB
testcase_09 AC 181 ms
116,648 KB
testcase_10 AC 179 ms
116,604 KB
testcase_11 AC 178 ms
116,368 KB
testcase_12 AC 180 ms
116,284 KB
testcase_13 AC 105 ms
72,796 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 105 ms
73,108 KB
testcase_17 WA -
testcase_18 AC 173 ms
116,116 KB
testcase_19 AC 172 ms
116,144 KB
testcase_20 AC 172 ms
116,204 KB
testcase_21 AC 172 ms
116,240 KB
testcase_22 AC 171 ms
116,084 KB
testcase_23 AC 175 ms
116,168 KB
testcase_24 AC 105 ms
72,732 KB
testcase_25 AC 106 ms
72,792 KB
testcase_26 AC 104 ms
72,880 KB
testcase_27 AC 106 ms
72,972 KB
testcase_28 AC 105 ms
72,928 KB
testcase_29 AC 104 ms
73,076 KB
testcase_30 AC 106 ms
72,796 KB
testcase_31 AC 109 ms
72,612 KB
testcase_32 AC 107 ms
72,824 KB
testcase_33 AC 105 ms
72,612 KB
testcase_34 AC 148 ms
111,952 KB
testcase_35 AC 119 ms
84,692 KB
testcase_36 AC 146 ms
107,980 KB
testcase_37 AC 140 ms
104,128 KB
testcase_38 AC 127 ms
93,032 KB
testcase_39 AC 120 ms
86,076 KB
testcase_40 AC 124 ms
89,356 KB
testcase_41 AC 116 ms
81,988 KB
testcase_42 AC 140 ms
101,132 KB
testcase_43 AC 145 ms
104,588 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)
S = max(A)
if S>M:
    print(1)
    exit()

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