#C10886. Missing Numbers Finder

    ID: 40140 Type: Default 1000ms 256MiB

Missing Numbers Finder

Missing Numbers Finder

You are given a list of integers which are assumed to be in the range \(1\) to \(n\), where \(n = \max\{nums\}\). Some numbers in the range may be missing. Your task is to find and print all missing numbers in the interval \( [1, n] \) in ascending order.

Example:

  • If the input is 1 2 3 4 5, then the output should be an empty line since no number is missing.
  • If the input is 2 3 4 5, then the missing number is 1.

The solution should read from standard input and write the result to standard output.

inputFormat

The input consists of a single line of space-separated integers representing the list nums. It is guaranteed that there will be at least one integer.

outputFormat

Print the missing numbers in ascending order separated by a single space. If there are no missing numbers, output an empty line.

## sample
1 2 3 4 5