Count of N digit numbers possible which satisfy the given conditions | C ++ implementation of the approach ; Function to return the factorial of n ; Function to return the count of numbers possible ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int fact ( int n ) { int res = 1 ; for ( int i = 2 ; i <= n ; i ++ ) res = res * i ; return res ; } int Count_number ( int N ) { return ( N * fact ( N ) ) ; } int main ( ) { int N = 2 ; cout << Count_number ( N ) ; return 0 ; }