Base Case
if ( N == 1 ) { document . write ( ( 10 ) + " " ) ; return ; } var dp = Array . from ( Array ( N ) , ( ) => Array ( 10 ) . fill ( 0 ) ) ; for ( var i = 1 ; i < 10 ; i ++ ) dp [ 0 ] [ i ] = 1 ; for ( var i = 1 ; i < N ; i ++ ) {