結果

問題 No.1330 Multiply or Divide
ユーザー aqua_tenhouaqua_tenhou
提出日時 2021-01-08 21:52:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 103,680 KB
最終ジャッジ日時 2024-04-28 02:45:41
合計ジャッジ時間 4,374 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 86 ms
103,680 KB
testcase_02 AC 36 ms
51,968 KB
testcase_03 AC 35 ms
51,968 KB
testcase_04 AC 34 ms
52,352 KB
testcase_05 AC 36 ms
51,712 KB
testcase_06 AC 74 ms
96,480 KB
testcase_07 WA -
testcase_08 AC 100 ms
101,888 KB
testcase_09 AC 100 ms
101,504 KB
testcase_10 AC 100 ms
101,956 KB
testcase_11 AC 99 ms
102,016 KB
testcase_12 AC 102 ms
101,924 KB
testcase_13 AC 38 ms
51,456 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 36 ms
52,352 KB
testcase_17 WA -
testcase_18 AC 98 ms
101,888 KB
testcase_19 AC 96 ms
101,632 KB
testcase_20 AC 95 ms
101,992 KB
testcase_21 AC 94 ms
101,972 KB
testcase_22 AC 97 ms
102,004 KB
testcase_23 AC 101 ms
102,016 KB
testcase_24 AC 37 ms
51,584 KB
testcase_25 AC 36 ms
51,968 KB
testcase_26 AC 36 ms
51,968 KB
testcase_27 AC 36 ms
51,840 KB
testcase_28 AC 36 ms
51,968 KB
testcase_29 AC 36 ms
51,456 KB
testcase_30 AC 35 ms
51,584 KB
testcase_31 AC 35 ms
51,456 KB
testcase_32 AC 35 ms
51,840 KB
testcase_33 AC 37 ms
51,456 KB
testcase_34 AC 78 ms
96,580 KB
testcase_35 AC 52 ms
69,376 KB
testcase_36 AC 71 ms
92,416 KB
testcase_37 AC 72 ms
88,704 KB
testcase_38 AC 59 ms
77,696 KB
testcase_39 AC 53 ms
70,912 KB
testcase_40 AC 56 ms
73,856 KB
testcase_41 AC 47 ms
66,432 KB
testcase_42 AC 68 ms
86,144 KB
testcase_43 AC 73 ms
89,472 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