Data Structures & AlgorithmsVery hardGATE CS · ICPC regional
What is the smallest positive integer that has exactly 6 positive divisors?
- A. 13
- B. 14
- C. 12
- D. 16
Correct answer: C. 12
A number with 6 divisors has the form p^5 or p^2 * q. The smallest is 2^2 * 3 = 12, which has divisors 1, 2, 3, 4, 6, 12.
Practise more Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questionsArrays, Strings, Linked Lists, Stacks, Queues and Hashing: notes and key points
More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions
- How many integers n in [1, 100] have both n and n + 2 prime?
- What is gcd(2^12 - 1, 2^8 - 1)?
- How many integers in [2, 20] are neither divisible by 2 nor by 3?
- How many division steps (modulo operations) does Euclid's algorithm perform on the pair (252, 105) before the remainder becomes 0?
- A binary search on the sorted array 1, 2, ..., 100 looks for 37 using mid = (lo + hi) // 2 with lo = 0 and hi = 99. How many comparisons…
- How many unordered index pairs i < j in the sorted array [1, 3, 4, 6, 8, 9, 11] satisfy a[i] + a[j] = 12?