Such a big contrast with yesterday and especially friday.
Quick and dirty Python solution:
# Get the input
frominputimportpuzzle_input# Set the width and height
width=25height=6# Split the input up in layers
layers=[]layer=""forindexinrange(0,len(puzzle_input)+1):ifindex%(width*height)==0:iflayer:layers.append(layer)layer=""ifindex<len(puzzle_input):layer+=puzzle_input[index]# Loop through the colors
index=0colors=""whileindex<len(layers[0]):forlayerinlayers:iflayer[index]!="2":iflayer[index]=="0":colors+=" "else:colors+="1"breakindex+=1ifindex%width==0:colors+="\n"print(colors)
Glad I could help :) I’m very far behind as well, have been out sick the past week and a half so didn’t get much done lately. Good thing I have two weeks of vacation coming up.
Such a big contrast with yesterday and especially friday.
Quick and dirty Python solution:
Hi Sarah,
this one is driving me crazy. I've got exact the same solution you have, but I don't know how to submit it.
I've tried submitting the solution as a string of "0" and "1", but that doesn't work. Same for a string of spaces and "1".
Is there something I'm not seeing?
Any help would be appreciated :)
If you print it like in my example, it should display letters. For example
Would be a C. Just type the letters in as a solution :)
Thanks Sarah. That did the trick. Glad to be past this one. Lots of catching up to do :)
Glad I could help :) I’m very far behind as well, have been out sick the past week and a half so didn’t get much done lately. Good thing I have two weeks of vacation coming up.
Part 1:
Should be an integer number. Mine was in the 10e4 range.
Part 2
This answer should be a string of capital letters. (Regex:
[A-Z]+
) Mine was 5 letters longYou’ll have to use your monkey meat based ocr system unless you’re a maniac who has a python one on hand.
Thanks Jon. A bit of squinting helped :)