• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Lesson 9. Sets

Difficulty level:

Task«Disordered array»

💻 Python
rn
in the new residential complex, the numbering of apartments begins with 1 and ends number & nbsp; n . However, during the settlement, it turned out that some of the rooms of the apartments were missed by mistakes of the developer. You were provided with a list of populated apartments in random order. It is necessary to determine and display in the order of increasing the number of missed apartments.

Input format

First, the number & nbsp; n is the maximum number of the apartment in the complex. Then a line containing the numbers of populated apartments is introduced, separated by spaces

Output format

The program should deduce in the order of increasing number of missing apartments, separated by spaces

Example

Input

10
1 2 4 6 7 9 10

Output

3 5 8

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

AI Helper

Hi! I am your programming assistant. Ask me anything about Python — I can explain functions, methods, and help you understand the current task!