結果
問題 |
No.1285 ゴミ捨て
|
ユーザー |
![]() |
提出日時 | 2025-03-31 17:24:55 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 82,168 KB |
実行使用メモリ | 77,940 KB |
最終ジャッジ日時 | 2025-03-31 17:25:09 |
合計ジャッジ時間 | 3,553 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 10 |
ソースコード
n = int(input()) a = [int(input()) for _ in range(n)] a.sort() if n == 0: print(0) exit() count = 1 current_max = a[0] for i in range(1, n): if a[i] > current_max + 1: current_max = a[i] else: count += 1 current_max = a[i] print(count)