Loading...
Loading...
Loading...
Orders are numbered from 1 to n. A report lists the order numbers that were received, in any order and possibly with repeats.
Print the order numbers from 1 to n that are missing from the report, in increasing order, separated by spaces. If none is missing, print None.
None.Example
Input
6 1 2 4 6 2
Output
3 5
Orders 3 and 5 are missing.
Try the problem first. Open one hint at a time.
Put the received numbers in a set so checking one is fast.
Go through 1 to n and keep the numbers that are not in the set.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor