Initialise N
int N = 3 ; int [ , ] dp = new int [ N + 1 , 2 ] ; for ( int i = 0 ; i < N + 1 ; i ++ ) { for ( int j = 0 ; j < 2 ; j ++ ) { dp [ i , j ] = - 1 ; } } if ( divisorGame ( N , 1 , dp ) == 1 ) { Console . Write ( " Player ▁ A ▁ wins " ) ; } else { Console . Write ( " Player ▁ B ▁ wins " ) ; } } }