結果

問題 No.1285 ゴミ捨て
ユーザー aaaaaaaaaa2230
提出日時 2020-11-14 10:04:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 156 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 77,804 KB
最終ジャッジ日時 2024-07-22 22:43:35
合計ジャッジ時間 3,131 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [int(input()) for i in range(n)]
ans = 1
a.sort(reverse=True)
for i in range(n-1):
    if a[i]-a[i+1] == 1:
        ans += 1
print(ans)
0