Page 1 of 2
Problem 223 & 224
Posted: Sun Jan 18, 2009 9:09 pm
by Darhuuk
Hi,
I haven't solved problems 223 & 224 yet, but it seems to me the wording is a little misleading. More specifically, I think that instead of
a <= b <= c
it should say
1 < a <= b <= c
Otherwise, problem 223 is trivial, keep a = 1, b = c. Well, not trivial, I realize there's more solutions than that.
Of course, maybe I misunderstood and that is in fact supposed to be one of the solutions.
Re: Wording Problem 223 & 224
Posted: Sun Jan 18, 2009 9:20 pm
by hk
Moved it here.....
Re: Wording Problem 223 & 224
Posted: Mon Jan 19, 2009 3:12 am
by rayfil
The wording used for a problem description is reviewed thouroughly in all its details by several people (at least three), before a problem is published, to make sure it is fully accurate and prevent any misunderstanding.
What you see is what you have to work with.
Re: Problem 223 & 224
Posted: Fri Jan 23, 2009 8:50 pm
by ansrivas
Can somebody confirm if the answer to 224 for perimeter<=9e6 is 496403.
Thanks.
Re: Problem 223 & 224
Posted: Sat Jan 24, 2009 11:48 am
by daniel.is.fischer
Yes.
Re: Problem 223 & 224
Posted: Tue Jun 23, 2009 1:16 pm
by axelbrz
Hi,
Do I have to take only the (a, b, c) triplet for which a < b + c, b < a + c, c < a + b and 1 <= a?
I mean, should I be able to construct a triangle with sides a, b, c?
Thanks.
Re: Problem 223 & 224
Posted: Tue Jun 23, 2009 1:56 pm
by daniel.is.fischer
"Let us call an integer sided triangle with sides a ≤ b ≤ c", so yes.
Re: Problem 223 & 224
Posted: Tue Jun 23, 2009 6:21 pm
by axelbrz
Oh! sorry, and thanks!

Re: Problem 223 & 224
Posted: Tue Jul 21, 2009 2:14 pm
by zwuupeape
Hey, I have a question about 224... I solved 223 but it took me almost half an hour to compute the results (my algorithm is identical to that used by others, code optimized by some methods, and I use external modules for some mathematical functions that are very efficient). Python, yes. 224 is not very different - I know exactly how to solve it and it will probably work fine if I give it like, say, 7 hours. Is there something I missed or is this problem supposed to be more demanding from the computer than 223?
Re: Problem 223 & 224
Posted: Tue Jul 21, 2009 2:32 pm
by Georg
For me problem 224 was easier than problem 223. I used nearly the same code and I had no problems [...] Runs in 10 seconds. (Java)
Re: Problem 223 & 224
Posted: Tue Jul 21, 2009 7:21 pm
by zwuupeape
Okay, I've solved it. There's a really smart solution (and I found that solution in a VERY dumb way), and there actually is a semi-smart solution that I didn't think of, but this semi-smart solution is much more difficult to find than the semi-smart solution for 223.

Re: Problem 223 & 224
Posted: Sat Nov 21, 2009 4:43 pm
by viv_ban
Can somebody please confirm the number of solutions for perimeter < 10^4 is equal to 13656
Re: Problem 223 & 224
Posted: Sat Nov 21, 2009 5:52 pm
by harryh
Yes, viv_ban, your answer for
Problem 223 (
View Problem) and perimeter ≤10000, seems to be correct.

Re: Problem 223 & 224
Posted: Thu May 15, 2014 2:02 pm
by paulwise3
That is strange, for (a+b+c) <= 10000 I get 13651. That is, I haven't found a solution yet, and certainly not an efficient one.
I suppose nobody can give me a hint?
Edit: ah, I used a < b < c instead of a <= b <= c. Now I have 13656 too. But still too slow to get anywhere near 25.000.000

.
Re: Problem 223 & 224
Posted: Sun Feb 22, 2015 2:18 pm
by Oliver1978
Let us call an integer sided triangle with sides a <= b <= c barely acute if the sides satisfy a^2 + b^2 = c^2 + 1.
So, if a = 1then I get approximately 12.5 million positive results*: 1^2 + b^2 = c^2 + 1, with b = c. Also a = 1 is not excluded in the description, so how can 10^4 be 13,656?
* with a perimeter <= 25,000,000
Re: Problem 223 & 224
Posted: Sun Feb 22, 2015 2:37 pm
by Georg
Because there are more triangles than perimeterlimit/2.
Re: Problem 223 & 224
Posted: Sun Feb 22, 2015 6:07 pm
by Oliver1978
I think I've found my mistake...
So, with a perimeter <= 20,000 that would make 29257 triangles?
Re: Problem 223 & 224
Posted: Sun Feb 22, 2015 8:34 pm
by Georg
Yes.
Re: Problem 223 & 224
Posted: Sat Oct 28, 2017 3:19 pm
by youth4ever
Hi,
I have written 2 pieces of code for problem 223.
I get two different answers , for the perimeter limit = 100.000 I get :
val1 = 168921 , val2 = 168676
EDIT : I also get val3 = 168350 when I try to optimize.
Can you please tell me which one is correct ?
Thanks.
Re: Problem 223 & 224
Posted: Sat Oct 28, 2017 11:56 pm
by jaap
youth4ever wrote: Sat Oct 28, 2017 3:19 pm
I have written 2 pieces of code for problem 223.
I get two different answers , for the perimeter limit = 100.000 I get :
val1 = 168921 , val2 = 168676
I can't find my code for this problem right now.
What you could do is have your computer compare the triangles generated by the two methods until you find one that is counted by method 1 but not by method 2. It is easily checked whether that is a valid almost right-angled triangle or not, so you then know see whether method 1 falsely includes it or method 2 falsely excludes it. The same then goes for your optimized method.