Problem list
Log in
#r03227 · Online Judge > GoldOJ

Find Two Missing Numbers

Bronze II 2.0 s 1024 MB

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

Input

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

Output

Print the two missing numbers in ascending order.

Example 1

Input
6
1 2 4 6
Output
3 5
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