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

Home > Just Math
Sum (Pair Product) - Sum = 21 (Posted on 2010-06-07) Difficulty: 2 of 5
Determine all possible triplet(s) (a, b, c) of positive integers, with a ≤ b ≤ c, that satisfy this equation.

a*b+b*c+c*a - (a+b+c) = 21

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

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution overkill solution | Comment 2 of 4 |

DEFDBL A-Z
FOR a = 1 TO 1000
FOR b = a TO 1000
FOR c = b TO 1000

 IF a * b + b * c + c * a - (a + b + c) = 21 THEN PRINT a; b; c

NEXT
NEXT
NEXT

finds

 1  1  22
 1  2  11
 2  2  7
 2  3  5

Overkill because lowest difference for given max number (c) should be when a and b are each 1. Then if

1+ c+c - (1+1+c) > 21

c > 22

and vice versa so we shouldn't expect any of the numbers to be greater than 22. 


  Posted by Charlie on 2010-06-07 13:19:11
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 (14)
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