There's a trick, but it's easy.

Difficulty: Easy

If x 2 + y 2 = 3 9 2 x^2+y^2=39^2 , and x x and y y are positive integers, what is the value of x + y x+y ?


The answer is 51.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

3 9 2 = 3 2 × 1 3 2 = 3 2 × ( 5 2 + 1 2 2 ) = ( 3 × 5 ) 2 + ( 3 × 12 ) 2 39^2=3^2\times 13^2=3^2\times (5^2+12^2)=(3\times 5)^2+(3\times 12)^2

So, one of x x and y y is 15 15 , and the other is 36 36

Hence their sum is 15 + 36 = 51 15+36=\boxed {51} , a number that can be obtained by interchanging the positions of digits of one of x x and y y .

But it's a bit hard to find that 1 3 2 = 5 2 + 1 2 2 13^2 = 5^2 + 12^2

Lâm Lê - 9 months, 3 weeks ago

Log in to reply

It's one of those facts that you just know when doing years of maths. It's a useful one. Besides, this is a contest-type number theory problem; for number theory problems you'll have to know your pythagorean triples and square numbers well.

Krishna Karthik - 9 months, 3 weeks ago
Aryan Sanghi
Aug 21, 2020

Here is the code:

1
2
3
4
for i in range(1, 39):
    for j in range(1, 39):
        if i*i + j*j == 39*39:
            print(i, j)

1
2
3
Output:
15 36
36 15

x + y = 51 x + y = 51

he he Nice one. I would've done it the same way myself lmao

Krishna Karthik - 9 months, 3 weeks ago

If the output shown be correct, then there must be some error in programming. The first line is OK, in the second line, j j is 1 1 more than required. The for looping should be rechecked.

A Former Brilliant Member - 9 months, 3 weeks ago

Log in to reply

It was a minor typo sir. Thanku for correction. :)

Aryan Sanghi - 9 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...