Day 25: Code Chronicle

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

  • CameronDevOPM
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    Congrats on reaching the finish line!

    The bit that caught me out was that the key + lock should equal 5 in reality, instead of being up to 5 in the challenge.

    • Acters@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      4 days ago

      Thanks! I quickly wrote it but didn’t think to count things. I just took the index of where the edge was located at and ran with it.

      So I don’t understand what you mean by equal 5. Could you elaborate? Cause I must have read the challenge text differently.

        • Acters@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          Oh! I didn’t think it that way, lol, I was thinking this quickly through. I didn’t think of relating to physical locks because it clearly said it was virtual. But I guess, there could theoretically be a physical tumbler lock with 0-5 spacers, it would just be a tall lock. You know like how some master keys have it so that there are spacers for the master key or the client key to open the lock.