Once one digit become less than any digit of input replace 7 ( largest 1 digit prime ) till the end of digits of number
while ( ns < size ) : NEW_LINE INDENT ans [ ns ] = '7' NEW_LINE ns += 1 NEW_LINE DEDENT ans [ ns ] = ' ' ; NEW_LINE