Author |
Message |
DtY
![](http://compsci.ca/v3/uploads/user_avatars/8576159234be48b7a8b0e8.png)
|
Posted: Sat Oct 24, 2009 8:44 am Post subject: Project Euler Problem 12 |
|
|
I got to what I thought was the right answer, but it's telling me I'm wrong.
[answer removed by request]
The answer it gives me is x with y factors, but euler tells me that's wrong.
I don't know exactly what code I can post for this, but if anyone has any ideas what I might be doing wrong it would be appreciated. (Or what code I can post that might be relevant).
Thanks
[edit] Sorry, meant to add link: http://projecteuler.net/index.php?section=problems&id=12 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
zylum
![](http://compsci.ca/v3/uploads/user_avatars/1689129126468091c334ee0.gif)
|
Posted: Sun Oct 25, 2009 12:10 pm Post subject: RE:Project Euler Problem 12 |
|
|
You are to give the value of the triangle number not which one it is. ie 28 not 5. (hint: you have the correct answer) |
|
|
|
|
![](images/spacer.gif) |
A.J
![](http://compsci.ca/v3/uploads/user_avatars/119833057151651227b0d87.gif)
|
Posted: Sun Oct 25, 2009 6:11 pm Post subject: RE:Project Euler Problem 12 |
|
|
Also, notice that the nth triangle number is merely the sum of the first n natural numbers. There's a closed form for that.
You actually do have the right answer. |
|
|
|
|
![](images/spacer.gif) |
DtY
![](http://compsci.ca/v3/uploads/user_avatars/8576159234be48b7a8b0e8.png)
|
Posted: Sun Oct 25, 2009 6:42 pm Post subject: RE:Project Euler Problem 12 |
|
|
Thanks both
I guess I should get the answer taken out of the post then
[edit] Note to moderators: I just reported zylum's post because I cannot report my own, and was expecting to be able to enter a report message. Could you edit my original post so that it doesn't have the answer? |
|
|
|
|
![](images/spacer.gif) |
|