Different answer when submitting and passing the same input as custom input


#1

The input is :
9999
99999
and the output is correct when runned as custom input