結果

問題 No.1330 Multiply or Divide
ユーザー persimmon_t01persimmon_t01
提出日時 2021-01-08 21:36:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,116 KB
実行使用メモリ 105,364 KB
最終ジャッジ日時 2024-04-28 02:21:14
合計ジャッジ時間 4,589 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 89 ms
105,220 KB
testcase_02 AC 38 ms
52,568 KB
testcase_03 AC 37 ms
51,756 KB
testcase_04 AC 37 ms
53,212 KB
testcase_05 AC 39 ms
53,012 KB
testcase_06 AC 76 ms
97,068 KB
testcase_07 WA -
testcase_08 AC 104 ms
101,888 KB
testcase_09 AC 107 ms
102,088 KB
testcase_10 AC 104 ms
101,864 KB
testcase_11 AC 103 ms
101,816 KB
testcase_12 AC 104 ms
101,904 KB
testcase_13 AC 38 ms
52,532 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 38 ms
52,888 KB
testcase_17 WA -
testcase_18 AC 94 ms
101,792 KB
testcase_19 AC 95 ms
101,972 KB
testcase_20 AC 95 ms
101,676 KB
testcase_21 AC 95 ms
102,032 KB
testcase_22 AC 94 ms
101,872 KB
testcase_23 AC 101 ms
102,060 KB
testcase_24 AC 39 ms
53,784 KB
testcase_25 AC 39 ms
52,952 KB
testcase_26 AC 39 ms
53,072 KB
testcase_27 AC 39 ms
52,396 KB
testcase_28 AC 39 ms
52,072 KB
testcase_29 AC 38 ms
52,692 KB
testcase_30 AC 39 ms
52,980 KB
testcase_31 AC 39 ms
52,132 KB
testcase_32 AC 38 ms
52,400 KB
testcase_33 AC 38 ms
51,748 KB
testcase_34 AC 74 ms
95,276 KB
testcase_35 AC 50 ms
67,904 KB
testcase_36 AC 69 ms
91,148 KB
testcase_37 AC 67 ms
87,796 KB
testcase_38 AC 56 ms
76,152 KB
testcase_39 AC 52 ms
70,112 KB
testcase_40 AC 52 ms
73,312 KB
testcase_41 AC 45 ms
65,232 KB
testcase_42 AC 64 ms
84,464 KB
testcase_43 AC 66 ms
88,576 KB
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,p=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
  if a[i]>m:
    print(1)
    exit()
  while a[i]%p==0:a[i]//=p
ma=max(a)
if ma==1:
  print(-1)
  exit()
now=1
ans=0
while now<=m:
  now*=ma
  ans+=1
print(ans)
0