If current position is 1 , then any digit from [ 1 - 9 ] can be placed . If N = 1 , 0 can be also placed .
if ( index == 1 ) : NEW_LINE INDENT digit = 0 if N == 1 else 1 NEW_LINE while ( digit <= 9 ) : NEW_LINE DEDENT