Project Euler #90: Cube digit pairs

  • + 0 comments

    I would make something more explicit.

    one way this can be achieved is by placing 056789 on one cube and 123489 on the other cube

    One could think that it counts as 2 solutions:

    • 056789 on the first one, 123489 on the second
    • 123489 on the first one, 056789 on the second

    This is not the case. It counts as 1 solution.

    So for 9 2 the answer is 1217.

    For 1 2 the answer is 13461. It can be also computed manually:

    0	1	3136
    0	01	3920
    01	01	2485
    01	1	3920