結果

問題 No.1330 Multiply or Divide
ユーザー wolgnikwolgnik
提出日時 2021-01-08 21:38:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,944 KB
実行使用メモリ 102,016 KB
最終ジャッジ日時 2024-04-28 02:26:30
合計ジャッジ時間 5,279 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 91 ms
100,736 KB
testcase_02 WA -
testcase_03 AC 42 ms
51,840 KB
testcase_04 AC 42 ms
51,968 KB
testcase_05 AC 42 ms
51,712 KB
testcase_06 AC 109 ms
96,768 KB
testcase_07 WA -
testcase_08 AC 130 ms
100,096 KB
testcase_09 AC 127 ms
100,216 KB
testcase_10 AC 127 ms
100,160 KB
testcase_11 AC 127 ms
100,020 KB
testcase_12 AC 129 ms
100,556 KB
testcase_13 AC 40 ms
51,840 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 38 ms
51,840 KB
testcase_17 WA -
testcase_18 AC 128 ms
99,968 KB
testcase_19 AC 130 ms
100,416 KB
testcase_20 AC 127 ms
99,712 KB
testcase_21 AC 128 ms
100,264 KB
testcase_22 AC 127 ms
100,096 KB
testcase_23 AC 96 ms
99,968 KB
testcase_24 AC 38 ms
51,968 KB
testcase_25 AC 38 ms
51,968 KB
testcase_26 AC 39 ms
52,224 KB
testcase_27 AC 38 ms
51,712 KB
testcase_28 AC 37 ms
51,712 KB
testcase_29 AC 38 ms
52,096 KB
testcase_30 AC 38 ms
51,968 KB
testcase_31 AC 38 ms
51,968 KB
testcase_32 AC 39 ms
51,760 KB
testcase_33 AC 39 ms
52,352 KB
testcase_34 AC 98 ms
95,360 KB
testcase_35 AC 56 ms
67,712 KB
testcase_36 AC 91 ms
91,520 KB
testcase_37 AC 86 ms
87,296 KB
testcase_38 AC 68 ms
76,160 KB
testcase_39 AC 58 ms
69,504 KB
testcase_40 AC 62 ms
72,960 KB
testcase_41 AC 51 ms
65,408 KB
testcase_42 AC 81 ms
84,864 KB
testcase_43 AC 88 ms
88,576 KB
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
N, M, P = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
x = 1
for i in range(40):
  if x > M:
    print(i)
    break

  for j in range(N - 1, -1, -1):
    if (x * a[j]) % P:
      x *= a[j]
      break
else:
  print(-1)
0