Loading...
Loading...
Loading...
A store receives n order ids. Print yes if any id appears more than once, otherwise print no.
Example 1
Input
5 101 102 103 104 102
Output
yes
The id 102 appears twice.
Example 2
Input
3 7 8 9
Output
no
All ids are different.
Try the problem first. Open one hint at a time.
A set keeps one copy of each value.
If the set is smaller than the list, something repeated.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor