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

Home > Numbers
Discounting one (Posted on 2018-01-10) Difficulty: 3 of 5
Any three of the integers {1, X, Y, Z} add up to a perfect square.

What are X, Y, & Z?

Hint: each is below 100.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution The only way to do it. (computer solution included) | Comment 1 of 9
(1, 8, 8, 8)

 n(1) = 1
 For x = 1 To 100
   n(2) = x
 For y = x To 100
   n(3) = y
 For z = y To 100
   n(4) = z
   good = 1
   For a = 1 To 3
    For b = a + 1 To 4
      sq = n(a) + n(b)
      sr = Int(Sqr(sq) + 0.5)
      If sr * sr <> sq Then
        good = 0: Exit For
      End If
    Next
    If good = 0 Then Exit For
   Next
   If good Then
     For i = 1 To 4
       Text1.Text = Text1.Text & Str(n(i))
     Next
     Text1.Text = Text1.Text & crlf
   End If
   DoEvents
 Next
 Next
 Next


  Posted by Charlie on 2018-01-10 14:04:44
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 (0)
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