When I first read that problem statement, I ignored the "in the repeat" bit.
The length of the repeating part should be one less than the quotient with base and numerator factors removed -- and I forgot about that until Andrew's comment here emphasized that issue. Thanks, -- Raul On Jul 25, 2014 2:41 PM, "Andrew Nikitin" <[email protected]> wrote: > > > Why not extend the question a bit? Given p, q and b, how many digits of > > base b will be required in the repeat? The answer could be an infinite > > number. > > No, it could not. > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
