結果

問題 No.2500 Products in a Range
ユーザー Akijin_007
提出日時 2023-10-13 21:28:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 61,056 KB
最終ジャッジ日時 2024-09-15 17:04:19
合計ジャッジ時間 4,364 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 45 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

from bisect import bisect, bisect_left
N, L, R = map(int, input().split())
A = list(map(int, input().split()))

A = sorted(A)

ans = 1
t = 1
for i in range(N-1):
    p = A[i] * A[i+1]
    if L <= p and p <= R:
        t += 1
    else:
        ans = max(t, ans)
        t = 1

ans = max(ans, t)

print(ans)




0