Finding number of digits in the exponent Avoiding exponents of value 1
if ( k == 1 ) s = s + countDigits ( r . get ( i ) ) ; else if ( k != 1 ) s = s + countDigits ( r . get ( i ) ) + countDigits ( k ) ; } }