All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Number = Sum (Digit)*Product (Digit) (Posted on 2010-06-21)
N is a positive base ten integer having at least 2-digits but at most 4-digits, which is obtained by multiplying the sum of its digits with the product of its digits. It is known that N cannot contain any leading zero.

Determine all possible value(s) of N.

 No Solution Yet Submitted by K Sengupta Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: Solution & thoughts | Comment 3 of 10 |
(In reply to Solution & thoughts by Jer)

DEFDBL A-Z
FOR n = 10 TO 999999
s\$ = LTRIM\$(STR\$(n))
sum = 0: prod = 1
FOR i = 1 TO LEN(s\$)
d = VAL(MID\$(s\$, i, 1))
sum = sum + d: prod = prod * d
NEXT
IF sum * prod = n THEN
PRINT n, sum; prod
END IF
NEXT

finds only the same

135           9  15
144           9  16

as Jer.

 Posted by Charlie on 2010-06-21 14:22:24
Please log in:
 Login: Password: Remember me: Sign up! | Forgot password

 Search: Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information