結果
問題 |
No.1285 ゴミ捨て
|
ユーザー |
![]() |
提出日時 | 2025-04-16 16:01:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 81,552 KB |
実行使用メモリ | 77,960 KB |
最終ジャッジ日時 | 2025-04-16 16:07:47 |
合計ジャッジ時間 | 2,898 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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) else: count = 1 current = a[0] for num in a[1:]: if current + 1 < num: current = num else: count += 1 current = num print(count)