結果
| 問題 |
No.1285 ゴミ捨て
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 23:30:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 283 bytes |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 77,752 KB |
| 最終ジャッジ日時 | 2025-04-15 23:31:36 |
| 合計ジャッジ時間 | 2,799 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
lam6er