We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #61: Cyclical figurate numbers
Project Euler #61: Cyclical figurate numbers
Sort by
recency
|
12 Discussions
|
Please Login in order to post a comment
For those who hate hard coding each individual equations
Triangular(n) -> gon(3, n), Square(n) -> gon(4, n), Pentagon(n) - gon(5, n), ...
Finally get what duplicates actually means here. To begin with, the answer set should be distinct. But if you're stuck with #7, you might want to know that any answer should contain no repeating elements to be valid (e.g.
[1651, 5151, 5151, 5192, 9216]
is not an answer for any input).Thank you very much with tutorial for testcase 7, this is problem very exciting !!!
Thanks mate. I was unable to understand why my submissions broke case #7 and you comment helped me crack it.
Their formulation is quite unclear on that particular point to be honest.
Beside that, great fun solving that problem !
Cheers
if different cyclical figurate numbers have the same sum, are they considered like duplicates?
For those struggling with test #7: "Each polygonal type: triangle (P3,127=8128)(P3,127=8128), square (P4,91=8281)(P4,91=8281), and pentagonal (P5,44=2882)(P5,44=2882), is represented by a different number in the set."
This phrase basically means that the set that you've found cannot have duplicates in it.
Hahaha... I have finally figured out that each number in the answer must be on a separate line (rather than space separated on a single line)
wow. I only see the people here saying "Oh, my test case 7 does not work". But you information really helped me. It's not written that they need to be in seperate lines...