結果
問題 | No.1330 Multiply or Divide |
ユーザー |
|
提出日時 | 2023-09-13 12:40:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 247 ms |
コンパイル使用メモリ | 81,980 KB |
実行使用メモリ | 116,000 KB |
最終ジャッジ日時 | 2024-06-30 21:39:39 |
合計ジャッジ時間 | 6,395 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 39 WA * 7 |
ソースコード
from collections import *from itertools import *from functools import *from heapq import *import sys,mathinput = sys.stdin.readlineN,M,P = map(int,input().split())A = list(map(int,input().split()))B = []for a in A:while a%P==0:a //= PB.append(a)L = max(B)if max(A)>M:print(1)exit()if L==1:print(-1)exit()now = 1cnt = 0while now <= M:cnt += 1now *= Lprint(cnt)