結果
| 問題 |
No.1285 ゴミ捨て
|
| コンテスト | |
| ユーザー |
学ぶマン
|
| 提出日時 | 2025-04-08 19:37:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 175 bytes |
| コンパイル時間 | 416 ms |
| コンパイル使用メモリ | 82,588 KB |
| 実行使用メモリ | 77,928 KB |
| 最終ジャッジ日時 | 2025-04-08 19:37:58 |
| 合計ジャッジ時間 | 4,253 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 10 |
ソースコード
N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 1
for i in range(N - 1):
now, nex = A[i], A[i + 1]
if nex - now == 1:
ans += 1
print(ans)
学ぶマン