We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#!/usr/bin/python3n=input()# Not really that useful to us.inputs=input().strip().split()# Create a list with the numbersiflen(set(inputs))==len(inputs):''' set() returns a list with only the unique entries in the list. so if the length of unique items == the length of the list itself then it contains no duplicates, otherwise it does contain duplicates. '''print("YES")else:print("NO")
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Security Bijective Functions
You are viewing a single comment's thread. Return to all comments →
Python 3