tchncs
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Mac@programming.dev to Advent Of Code@programming.dev · 2 年前

[2023 Day #1] Massive Difficulty Increase

programming.dev

message-square
25
link
fedilink
135

[2023 Day #1] Massive Difficulty Increase

programming.dev

Mac@programming.dev to Advent Of Code@programming.dev · 2 年前
message-square
25
link
fedilink
  • Strawberry@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    2 年前

    Just don’t replace, or replace only the first letter with the numeral

    • DaleGribble88@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 年前

      You can’t just replace the first letter either, because depending on the order of your replacements, you could be replacing the end of another number. (Encountered this exact problem trying to optimize my solution.)

      • CameronDev@programming.devM
        link
        fedilink
        arrow-up
        4
        ·
        2 年前

        I replaced the second letter, none of them overlap 2 letters.

        • Strawberry@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          2 年前

          Clever

      • Strawberry@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        2 年前

        As long as you replace any spelled out numbers from left to right it should work

        • stifle867@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          2 年前

          2oneight - if you replace from left to right you get 21ight or 21. This doesn’t work for part 2 as the answer should br 28.

          • Strawberry@lemmy.blahaj.zone
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            2 年前

            We’re talking about just the first letter, so

            2oneight —> 21neight —> 21n8ight

Advent Of Code@programming.dev

advent_of_code@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !advent_of_code@programming.dev

An unofficial home for the advent of code community on programming.dev! Other challenges are also welcome!

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Everybody Codes is another collection of programming puzzles with seasonal events.

EC 2025

AoC 2025

Solution Threads

M T W T F S S
1 2 3 4 5 6 7
8 9 10 11 12

Visualisations Megathread

Rules/Guidelines

  • Follow the programming.dev instance rules
  • Keep all content related to advent of code in some way
  • If what youre posting relates to a day, put in brackets the year and then day number in front of the post title (e.g. [2024 Day 10])
  • When an event is running, keep solutions in the solution megathread to avoid the community getting spammed with posts

Relevant Communities

  • !programming@programming.dev
  • !challenges@programming.dev

Relevant Links

  • Advent of Code Homepage

Credits

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

console.log('Hello World')
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 86 users / week
  • 297 users / month
  • 325 users / 6 months
  • 41 local subscribers
  • 1.2K subscribers
  • 182 Posts
  • 2.32K Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • Sigmatics@lemmy.ca
  • CameronDev@programming.dev
  • hades@programming.dev
  • BE: 0.19.14
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org