結果
問題 | No.1330 Multiply or Divide |
ユーザー |
![]() |
提出日時 | 2021-01-08 22:24:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 32,648 KB |
最終ジャッジ日時 | 2024-11-16 13:08:05 |
合計ジャッジ時間 | 5,482 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 WA * 8 |
ソースコード
def f(x): while x % P == 0: x //= P return x N, M, P, *A = map(int, open(0).read().split()) max_A = max(A) t = max(map(f, A)) if t in [0, 1]: print(-1) exit() x = 1 result = 0 while True: result += 1 if x * max_A > M: break x *= t print(result)