Loading...
Loading...
Loading...
A support desk logs customer ids as tickets arrive. Print YES if any id appears more than once, and NO if all ids are different.
Example
Input
5 101 205 330 205 410
Output
YES
205 appears twice.
Try the problem first. Open one hint at a time.
A set holds each id once. Compare its size with n.
No loop inside a loop is needed.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor