Sunday, March 24, 2013

project euler problem 061

Cyclical figurate numbers

This problem is a simple problem. One just needs to find all the pairs of number and order(3, 4, 5, 6, 7, 8), then find the cycle recursively. It is very fast, less than 1ms on my notebook.

I found my old code, it was messy, I used multimap in the code. The code has 200 lines; the new one has only 70 lines.

No comments:

Post a Comment