結果
| 問題 |
No.1330 Multiply or Divide
|
| コンテスト | |
| ユーザー |
aqua_tenhou
|
| 提出日時 | 2021-01-08 21:42:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 337 bytes |
| コンパイル時間 | 212 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 103,680 KB |
| 最終ジャッジ日時 | 2024-11-16 10:53:11 |
| 合計ジャッジ時間 | 4,941 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 WA * 9 |
ソースコード
n,m,p = map(int,input().split())
a = list(map(int,input().split()))
m_a = max(a)
s = -1
for x in a:
if x%p == 0:
pass
else:
s = max(s, x)
if s == -1:
if m_a > m:
print(1)
else:
print(-1)
else:
ans = 1
x = 1
while x*m_a < m:
x *= s
ans += 1
print(ans)
aqua_tenhou