Cephalopod math doesn’t look that different from normal math.
Part 1
Here is the thing with text that looks like this:
123 328 51 64
45 64 387 23
6 98 215 314
* + * +
The requirements for this part of the puzzle allows for you to assume some spacing to get the answer knowing full well that’s not going to cut it in the next one. My strategy, as it has been with most of these is to get the lines into an array, and traverse that grid to rearrange the data and find the answer.
With a grid (2-dimensional array) in place I read it column first to build the equation and assuming the last row in a column is the operation. I ignored spacing as much as I could which absolutely will come back to bite me in the next part.
Part 2
As you can see in the above each column of data has a number with three characters so the columns are all of uniform width. The input data for this does not have that characteristic so it is a bit harder to parse. I ended up using the very last row to determine spacing of the rows since numbers that are less than the with of the column can have a space at the front of back of the number.
Since the numbers were written vertically I decided to translate the grid so the width is the height of the original and the width is the height. The right column above reads like 4 + 431 + 623 = 1058
I’m sure this is doing too much but it completes relatively quickly.
Interactions
Comments
This blog uses a Mastodon and webmentions for comments. You can comment by replying on Mastodon/ActivityPub/Fediverse account or webmention.