All challenges
mediummath 10 XP per passing test
Find the Missing Number
Problem
Given a list of numbers from 1 to n, find the missing number. The list can contain duplicates and negative numbers. The input is given on two lines: the first line contains the size of the list and the second line contains the list of numbers. The output should be the missing number.
(run your code to see output)
Advertisement