|
|
Wlodzimierz ABX Skiba <abx### [at] abxartpl> wrote:
: multiplication has symetry
: concatenation hasn't
Your solution just multiplies I1 with the smallest multiple of 10 that
is larger or equal to I2 and then adds I2 to the result.
This is effectively the same as I1*I2+I2, the only difference being that
instead of multiplying with a the smallest multiple of 10 which is larger
or equal to I2, we are multplying with the smallest number which is larger
or equal to I2, which is, of course, I2 itself.
Now, I1*I2+I2 = (I1+1)*I2, and by all practical means this probably will
not give a too different result than just I1*I2.
That's why I think that I1*I2 will probably give an equally good result
with less overhead.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
|