Common Elements
Submit solution
Python
Points:
10 (partial)
Time limit:
10.0s
Memory limit:
12M
Authors:
Problem types
Allowed languages
Find the common integers between two inputs, which are stored as a list and a set, respectively.
Input:
Two lines, each containing a set of integers.
Output:
The numbers that are common among the two inputs (including duplicates), displayed in the list format (square braces).
Sample Input:
1 4 6 12 4 7
3 1 6 10 9
Sample Output:
[1, 6]
Comments