結果
問題 |
No.1330 Multiply or Divide
|
ユーザー |
👑 ![]() |
提出日時 | 2021-01-08 21:26:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 224 bytes |
コンパイル時間 | 493 ms |
コンパイル使用メモリ | 82,568 KB |
実行使用メモリ | 118,944 KB |
最終ジャッジ日時 | 2024-11-16 10:07:40 |
合計ジャッジ時間 | 5,002 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 WA * 8 |
ソースコード
N,M,P=map(int,input().split()) A=list(map(int,input().split())) B=[] for a in A: while a%P==0: a//=P B.append(a) S=max(B) if S==1: print(-1) exit(0) t=1 K=0 while t<=M: t*=S K+=1 print(K)