Smallest Missing Number
Given a list of numbers, write a program to print the smallest positive integer missing in the given numbers.
Input
The input will be a single line containing numbers separated by space.
Help me to do this not coimg correcr answer
def findSmallestMissingNumber(numbers):
counter = 1
numbersSet = set(numbers)
while counter in numbersSet:
counter += 1
return counter
numbers = input().split()
for i in range(len(numbers)):
numbers[i] = int(numbers[i])
print(findSmallestMissingNumber(numbers))
Comments
Leave a comment