Octave, 91 x 153 = 13923
a=sym(9);while i<6
i=0;a++;q='01234';for t=q(perms(1:5))'
i+=contains(char(a),t');end
end
a
Brute force solution with arbitrary length (symbolic
) integer. But wait!, you say, you have not initialized i
. I abuse here that Octave can use i
both as the complex number (smaller than 6) and a variable.
Please get back with me until the heat death of the universe to check the results.