結果
問題 |
No.1330 Multiply or Divide
|
ユーザー |
![]() |
提出日時 | 2021-01-08 23:12:55 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 485 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 120,832 KB |
最終ジャッジ日時 | 2024-11-16 16:31:04 |
合計ジャッジ時間 | 6,144 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 39 WA * 7 |
ソースコード
n,m,p,*a=map(int,open(0).read().split()) a.sort(reverse=True) b=[] for i in a: while i%p==0: i//=p b+=[i] b.sort(reverse=True) x=1 j=0 while x<=m: if x*a[0]>m: print(j+1) exit() if b[0]==1: print(-1) exit() x*=b[0] j+=1