Count numbers which are divisible by all the numbers from 2 to 10 | Java implementation of the approach ; Function to return the count of numbers from 1 to n which are divisible by all the numbers from 2 to 10 ; Driver code
class GFG { static int countNumbers ( int n ) { return ( n / 2520 ) ; } public static void main ( String args [ ] ) { int n = 3000 ; System . out . println ( countNumbers ( n ) ) ; } }