If first digit is 0 no need to print it
if ( a [ 0 ] != 0 ) { for ( long long i = 0 ; i <= level ; i ++ ) cout << a [ i ] ; for ( long long i = level + 1 ; i < m ; i ++ ) cout << "9" ; } else { for ( long long i = 1 ; i < level ; i ++ ) cout << a [ i ] ; for ( long long i = level + 1 ; i < m ; i ++ ) cout << "9" ; } }