結果

問題 No.1330 Multiply or Divide
ユーザー aqua_tenhouaqua_tenhou
提出日時 2021-01-08 21:42:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 337 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 104,104 KB
最終ジャッジ日時 2024-04-28 02:33:31
合計ジャッジ時間 4,058 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 76 ms
104,104 KB
testcase_02 AC 32 ms
52,620 KB
testcase_03 AC 31 ms
52,824 KB
testcase_04 AC 32 ms
52,280 KB
testcase_05 AC 33 ms
52,564 KB
testcase_06 AC 71 ms
96,800 KB
testcase_07 WA -
testcase_08 AC 93 ms
101,832 KB
testcase_09 AC 90 ms
101,948 KB
testcase_10 AC 85 ms
101,896 KB
testcase_11 AC 86 ms
101,856 KB
testcase_12 AC 89 ms
102,000 KB
testcase_13 AC 31 ms
52,620 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 30 ms
53,096 KB
testcase_17 WA -
testcase_18 AC 83 ms
102,128 KB
testcase_19 AC 85 ms
102,016 KB
testcase_20 AC 83 ms
101,928 KB
testcase_21 AC 86 ms
102,000 KB
testcase_22 AC 86 ms
102,212 KB
testcase_23 WA -
testcase_24 AC 30 ms
52,556 KB
testcase_25 AC 33 ms
52,888 KB
testcase_26 WA -
testcase_27 AC 33 ms
53,300 KB
testcase_28 AC 30 ms
52,668 KB
testcase_29 AC 30 ms
53,172 KB
testcase_30 AC 30 ms
52,116 KB
testcase_31 AC 30 ms
52,632 KB
testcase_32 AC 30 ms
52,668 KB
testcase_33 AC 30 ms
53,176 KB
testcase_34 AC 66 ms
96,932 KB
testcase_35 AC 45 ms
69,660 KB
testcase_36 AC 63 ms
92,928 KB
testcase_37 AC 59 ms
88,992 KB
testcase_38 AC 50 ms
77,312 KB
testcase_39 AC 45 ms
70,912 KB
testcase_40 AC 46 ms
74,112 KB
testcase_41 AC 39 ms
66,688 KB
testcase_42 AC 55 ms
86,272 KB
testcase_43 AC 60 ms
90,120 KB
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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:
    if m_a > m:
        print(1)
    else:
        print(-1)
else:
    ans = 1
    x = 1
    while x*m_a < m:
        x *= s
        ans += 1
    print(ans)
    
0