Question bank › Math
Dsa Math Medium

Diverse Factors

Given an integer N, determine the count of distinct factors of N that are not present in its prime factors. A factor is defined as a number that divides N without leaving a remainder. Input: A single integer N (1 <= N <= 10^6). Output: An integer representing the count of diverse factors. Example: Input: 12 Output: 2 Explanation: The factors of 12 are 1, 2, 3, 4, 6, 12. The prime factors are 2 and 3. The diverse factors are 1, 4, 6, 12, hence the count is 4 - {2,3} = 2.

Key concepts

mathfactorizationdivisor

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.