結果

問題 No.3067 +10 Seconds Clock
ユーザー gew1fw
提出日時 2025-06-12 16:18:35
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 199 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 82,516 KB
実行使用メモリ 67,064 KB
最終ジャッジ日時 2025-06-12 16:18:47
合計ジャッジ時間 2,825 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
count = 0
i = 0
while i < n:
    if i + 1 < n and abs(a[i] - a[i+1]) <= 1:
        count += 1
        i += 2
    else:
        i += 1
print(count)
0