On Mon, Apr 5, 2010 at 6:17 PM, Ian Gorse <[email protected]> wrote:
> "Find the only 4-digit integer which the product of its digits is
> equal to the first two digits of the number, and the sum of its digits
> is equal to the last two digits of the number"

   (#~ ] = 100 #. [: (*/"1 ,. +/"1) (4$10)&#:) 1e3 + i. 9e3

> can you find all the 5-digit integers
> which has similar property, the product of its digits is equal to the
> first three digits of the number, and the sum of its digits is equal
> to the last two digits of the number?"

   (#~ ] = 100 #. [: (*/"1 ,. +/"1) (5$10)&#:) 1e4 + i. 9e4

Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to