Just having a looky at this one...
http://code.google.com/codejam/contest/ ... 89252#s=p0I can't see how "cats" can return 75.
The way I see it...
cats uses 4 digits: c, a, t and s.
The smallest possible digits they could represent are 0, 1, 2 and 3.
If it can't begin with 0 then the smallest number is 1023 and the smallest base it can use is base 3.
i.e. 1 x 27 + 0 x 9 + 2 * 3 + 3 * 1 = 36.
So the lowest number represented by "cats" is 36 not 75.
Unless I'm missing the point?
::EDIT::
NVM... 0, 1, 2, 3 is base 4.
i.e. 1 * 64 + 0 * 16 + 2 * 4 + 3 * 1 = 75.
I was right and wrong at the same time
