Easy10 pts
Between Two Sets
Find integers x such that: all elements of a divide x, and x divides all elements of b. Count such x.
Input
n m\na[0]...a[n-1]\nb[0]...b[m-1]
Output
Count.
Sample
2 3 2 4 16 32 96
Expected
3
Loading editor…
Output
No output yet. Run your code to see results.