The Lookup ☝🏽
We're at day 20 of Ramadan. The final 10 days are upon us and members of the community will be locking into dedicating themselves even more in the hope that they gain the reward of Laylat al Qadr. Muslims believe the reward for any worship on Laylat al Qadr has the reward of having performed that deed for 1000 months!
Having just prayed tarawih prayers, Mustafa sits alone in the mosque long after everyone has left.
He thinks back over the month so far. He has enjoyed the extra time with the community where people have bonded so well.
His eyes begin to well as he dwells in the thought of the good time he has had so far.
he lays back looking at the ceiling and something happens.
Everyone had been looking down.
At the rows.
At the numbers.
At the floor.
But no one ever looked up!
The glow of the lanterns on the ceiling with the combination of the tears in his eyes causes the patterns to rotate.
This would take what looks like an incoherent message such as:
....##--######--..##.#
..##.#--##..##--.##.##
..##..--####..--.####.
..####--....##--###.#.
..###.--####..--#..#..
once rotated this would looks like this:
##..##--######--.####.
.####.--##....--##....
..##..--####..--.####.
..##..--##....--....##
..##..--######--.####.
Some help
- Every shape on the ceiling is made is a height of
5and a width of6. - The
#is part of the shape. - while the
.represents a blank area in the shape. - The shapes are seperated by 2 columns of
-. - each shape therefore is therefor a 2D grid of
6x5or to make it more simple to visualise: - The 4 corners of each shape need to be rotated by 90 degrees.
Your task
- Take the data in the rows of the input file and find the message by rotating every shape 90 degrees.
Enter the message exactly as it appears with no extra whitespace.