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

Home > Numbers
Number = Sum (Digit)*Product (Digit) (Posted on 2010-06-21) Difficulty: 2 of 5
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.

See The Solution Submitted by K Sengupta    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution 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 (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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