Cases to find minimum number of digits to be removed
if ( sum == 0 ) { document . write ( 0 + " " ) ; } if ( sum == 1 ) { if ( ( one != 0 ) && ( N > 1 ) ) document . write ( 1 + " " ) ; else if ( two > 1 && N > 2 ) document . write ( 2 + " " ) ; else document . write ( - 1 + " " ) ; } if ( sum == 2 ) { if ( two != 0 && N > 1 ) document . write ( 1 + " " ) ; else if ( one > 1 && N > 2 ) document . write ( 2 + " " ) ; else document . write ( - 1 + " " ) ; }