結果

問題 No.2757 Pin Game
ユーザー cologne
提出日時 2025-05-23 16:08:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 715 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 127,632 KB
最終ジャッジ日時 2025-05-23 16:08:48
合計ジャッジ時間 3,220 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
*a,=map(int,input().split())

z = None
x = 1
for c in a:
	if z is None:
		z = c
	if c-z>=k:
		z=c
		x += 1
print(x)
0