← All problemsSign in

Find The Factors

Given an array of $N$ numbers, you have find all the numbers such that they divide all the elements of the array ###Input: - First line will contain $N$ numbers - Second line will contain $N$ spaced positve integers. ###Output: -print all the numbers that they divide all elements in the array in increasing order ###Constraints - $1 \leq N \leq 10^5$ - $1 \leq A[i] \leq 10^9$ ###Sample Inpu

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start