Given a number n, find the total numbers, less than or equal to n which have at-least one common factor with n other than 1.
- Time : O(nlogn)
- Space : O(1)
1 | class Solution { |
Given a number n, find the total numbers, less than or equal to n which have at-least one common factor with n other than 1.
1 | class Solution { |