Exactly 3 Divisors
Sun Feb 06 2022 02:04:54 GMT+0000 (Coordinated Universal Time)
Saved by @Uttam #java #mathematics #gfg #geeksforgeeks #exactly3divisors
8. Exactly 3 Divisors Given a positive integer value N. The task is to find how many numbers less than or equal to N have numbers of divisors exactly equal to 3. Example 1: Input: N = 6 Output: 1 Explanation: The only number less than 6 with 3 divisors is 4. Example 2: Input: N = 10 Output: 2 Explanation: 4 and 9 have 3 divisors. Your Task: You don't need to read input or print anything. Your task is to complete the function exactly3Divisors() that takes N as input parameter and returns count of numbers less than or equal to N with exactly 3 divisors. Expected Time Complexity: O(N^1/2 * N^1/4) Expected Auxilliary Space: O(1) Constraints : 1 <= N <= 10^9
https://practice.geeksforgeeks.org/problems/exactly-3-divisors/1/?track=DSASP-Mathematics&batchId=190
Comments