• @[email protected]
    link
    fedilink
    2
    edit-2
    2 years ago

    I coming a bit from behind, just did this question

    part1 test answer is 35 (0.00 seconds)

    part1 answer is 3374647 (0.10 seconds)

    part2 test answer is 46 (0.00 seconds)

    part2 answer is 6082852 (0.34 seconds)

    interval arithmetics bitch

  • @[email protected]OP
    link
    fedilink
    6
    edit-2
    2 years ago

    I thought it would be a long-runner, but I also guessed that getting to a better solution would take a while, so I set it off and it did eventually return an answer before I could even plan out a solution that might improve things. Who needs algorithms when you’ve got Moore’s law.

      • @[email protected]
        link
        fedilink
        English
        22 years ago

        on my first attempt my computer couldn’t run Spotify at the same time because it was paging so hard >.<

        final go was in the order of 20 seconds or so I think (with practically 0 memory usage)

  • @[email protected]
    link
    fedilink
    52 years ago

    My first version ran for about 90 minutes. My second version, for about 45 seconds. I’m sure there’s more optimization to be done, but that was good enough for me :)

    • @[email protected]
      link
      fedilink
      English
      42 years ago

      optimised in most of an evening, runs in 0.06 seconds - well at least it will be quick for all of the (one) times that I have to run it!