Geeksforgeeks

Error

You will be given a positive integer **N**. Your task is to find the number of positive integers **K** ≤ **N **such that **K** is not divisible by any number among the set {2,3,4,5,6,7,8,9,10}.

**Example 1:**

Input:N =11Output:2Explanation:1 and 11 are the only possible solutions.

**Example 2:**

Input:N =2Output:1Explanation:1 is the only possible solution.

**Your Task:**

You don't need to read input or print anything. Your task is to complete the function **noOfNumbers()** which takes an Integer N as input and returns the answer.

**Expected Time Complexity:** O(1)

**Expected Auxiliary Space:** O(1)

**Constraints:**

1 <= N <= 10^{18}

We are replacing the old Disqus forum with the new Discussions section given below.

Click here to view old Disqus comments.

Click here to view old Disqus comments.

Login to report an issue on this page.

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

YesLoading...

Number that are not divisible

...