Count of N digit numbers possible which satisfy the given conditions | Java implementation of the approach ; Function to return the factorial of n ; Function to return the count of numbers possible ; Driver code
import java . io . * ; class GFG { static int fact ( int n ) { int res = 1 ; for ( int i = 2 ; i <= n ; i ++ ) res = res * i ; return res ; } static int Count_number ( int N ) { return ( N * fact ( N ) ) ; } public static void main ( String [ ] args ) { int N = 2 ; System . out . print ( Count_number ( N ) ) ; } }