w
, x
, y
, and z
) and instructions defined below. Find the largest 14 digit number with no 0 digits which result in z=0
.Part 1: An input stream can contain:
groups
are delimited by{
and}
,groups
are nestable and may containgarbage
or data (objects within agroup
are comma delimited)garbage
is delimited by<
and>
,groups
cannot be nested withingarbage
, a!
withingarbage
is an escape character:!>
does not end a garbage segment
The score of a single group is equal to how many times it is nested (the innermost group of
{{{}}}
has score3
).
The score of a stream is the sum of the scores of all groups in that stream.
What is the total score of your input?
Last week we parsed some music. That post was in a bit of a hurry, so we had to leave off a fair few important pieces (like ties and slurs for one; chords for a rather bigger one). We’ll get to them soon, but for now we want to actually get something playing back.
It’s been a bit, but as you may have noticed life is a bit mad at the moment. But I’ve still made some progress.
When we left off last time, we’d finished the first step towards making some lovely music with Racket: tokenization. Now we want to take those songs and form them into something actually approaching music.
It’s been a bit since I’ve had time to post1, but I’ve got an interesting new project that I’ve been working on. It’s a bit more complicated, ergo spread out over a few posts, but those tend to be the more interesting posts anyway, eh?
The basic idea is that I want to be able to write and play music in Racket. One end goal would be to make a library available for the C211 class to give them something else to work with (in addition to <a href="//blog.jverkamp.com"/wombat-ide/c211-image-api/">images and <a href="//blog.jverkamp.com"/wombat-ide/c211-turtle-api/">turtles). To that end, here’s my current plan of attack2:
Sounds like fun! Let’s get started.