Fill in the blanks with code so that the program accepts a list of integers and prints YES if all the integers in the list are unique. Else the program prints NO as the output.
Input Format:
The first line contains the list of integers separated by a space.
Output Format:
The first line contains YES or NO.
Example Input/Output :
7893
YES
Solution:
numList=list(map(int,input().split()))
if len(numList)==len(set(numList)):
print("YES")
else:
print("NO")
No comments:
Post a Comment