結果

問題 No.2757 Pin Game
ユーザー ra5anchor
提出日時 2024-06-04 05:32:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 120,400 KB
最終ジャッジ日時 2024-12-23 10:47:40
合計ジャッジ時間 2,462 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
X = list(map(int, input().split()))
cnt = 1
now = X[0]
for i in range(1,N):
    d = X[i] - now
    if d >= K:
        cnt += 1
        now = X[i]
print(cnt)
0