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

Home > Numbers
3 integers (Posted on 2023-02-27) Difficulty: 2 of 5
The 3 integers I have in mind sum up to 35 and their product is 720.
Please find them.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Computer solution | Comment 3 of 6 |
You have a selection:
(3,12,20) sum=35 prod=720
(5,6,24) sum=35 prod=720
(45,-2,-8) sum=35 prod=720

-------
def divisors(n):
    """ output a list of all factors of n including 1 and n  """
    ans = []
    for i in range(1,n+1):
        if n%i == 0:
            ans.append(i)
    ans = ans + [-i for i in ans]
    return ans

facs = divisors(720)
solutions = []
for f in facs:
    a = divisors(int(720/f))
    for d in a:
        e = int(720/(f*d))
        if f+d+e == 35:
            solution = sorted([f,d,e])
            if solution in solutions:
                continue
            solutions.append(solution)
            print( '({},{},{}) sum={} prod={}'.format(f,d,e,f+d+e, f*d*e))

  Posted by Larry on 2023-02-27 08:34:23
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 (5)
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