@karluk

Sorry I didn't see that, I thought the your problem was with X and T. Sorry again.

## Problem 143

**Forum rules**

As your posts will be visible to the general public you

are requested to be thoughtful in not posting anything

that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

See also the topics:

Don't post any spoilers

Comments, questions and clarifications about PE problems.

### Re: Problem 143

This is a very nice problem, which I thought I had solved. But...

Thanks in advance.

... I get exactly the same problem. daniel.is.fisher seems to suggest that every statement above is correct, which just makes this even more of a mystery to me. I have checked that every solution fulfills the conditions (already given by the construction of the triangle), that no angle of the triangle (a, b, c) is greater than 120 degrees. I have also checked that a-b < c <= b <= a, implying that it is possible to construct all of the triangles. I've even checked that no solution is repeated, both in terms of (a, b, c) and (p, q, r). In other words: I'm stuck. Since my answer is identical to the one quoted above, I would like to conclude that there is no bug in my code, but that I've missed something on the theoretical level. Am I correct about this? And in order to find that which I am missing, should I look towards the geometrical part (construction of triangles etc.) or the numerical part (solving the equations derived from the geometrical part) of the problem?zwuupeape wrote:I have a total of 508 triangles for the original limit L = 120000. Total sum is 8 digits, starts with a 3.

If I lower it to 12000 I get only 38 triangles, total sum 251752.

What's wrong ?? =\

Thanks in advance.

### Re: Problem 143

The problem might be in the interpretation of this sentence: Find the sum of all distinct values of p + q + r ≤ 120000

If I remember well it has to be interpreted as the values of p+q+r must be distinct.

It might be that there are more (p,q,r) with the same p+q+r.

If I remember well it has to be interpreted as the values of p+q+r must be distinct.

It might be that there are more (p,q,r) with the same p+q+r.

### Re: Problem 143

Ah, of course - being such a non-intuitive condition for (p, q, r), I totally neglected it. Anyway, I solved it now, thank you!

### Re: Problem 143

If I calculate the problem using a smaller target of 12,000 instead of the original target of 120,000 I get 20 triangles, and the sum of p+q+r = 128015.

Would someone please tell me if this is correct?

Thanks in advance.

(Gee this problem is teaching me a lot about geometry that I never knew)

Would someone please tell me if this is correct?

Thanks in advance.

(Gee this problem is teaching me a lot about geometry that I never knew)

- nicolas.patrois
**Posts:**118**Joined:**Fri Jul 26, 2013 4:54 pm-
**Contact:**

### Re: Problem 143

My sum is bigger.

### Re: Problem 143

Many thanksnicolas.patrois wrote:My sum is bigger.