結果
問題 |
No.1330 Multiply or Divide
|
ユーザー |
![]() |
提出日時 | 2021-01-08 21:59:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 1,031 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 103,296 KB |
最終ジャッジ日時 | 2024-11-16 11:37:21 |
合計ジャッジ時間 | 5,185 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 WA * 8 |
ソースコード
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: print(-1) else: ans = 0 x = 1 while x <= m: x *= s ans += 1 print(ans)