Problem list
Log in
#r03228 · Online Judge > GoldOJ

Find K Missing Numbers

Bronze II 2.0 s 1024 MB

Exactly $k$ numbers from $1$ to $n$ are missing. Given the remaining $n-k$ numbers (in any order), print the $k$ missing ones in ascending order, space-separated.

Input

Line 1: $n$ $k$ ($1 \le k < n \le 100$). Line 2: the $n-k$ present numbers.

Output

Print the $k$ missing numbers in ascending order.

Example 1

Input
7 3
1 3 4 7
Output
2 5 6
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code