Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Q gives us his cubes arranged as a flat square on the ground. By folding the cubes over each other, North to South, and West to East, a pillar of cubes is eventually formed. Reading the letters and numbers on this pillar from top to bottom is the message that Q wants us to find.
- Q's cubes are given from an aerial point of view:
- ABCD
- EFGH
- IJKL
- MNOP
- Here is an album which gives each cube a color: https://imgur.com/a/8ueja
- This is very easy to understand if you can visualize it, so try to understand it visually first, then conceptually.
- As you can see, the folds start from top to bottom, then left to right, and alternate until we have our final pillar. In our example, the message would be read as: OCBNJFGKLHEIMADP
- Remember, Q's cubes have both letters and numbers on them, so they may not necessarily have only letters.
- Find Q's secret message hidden in the cubes!
- *Hint: Q has been playing Baseball for 16 years*
- [Additional Test Cases]
- Raw Input --> Raw Output
- =======================
- 2x2 Grid of Cubes --> 3124
- 12
- 34
- =======================
- 8x8 Grid of Cubes --> ?GB5hZemldai6CF91NKyqSVtuWRpxJO23PIwoQXvsUTrzLM08ED7jbcknfYg4AH!
- ABCDEFGH
- IJKLMNOP
- QRSTUVWX
- YZabcdef
- ghijklmn
- opqrstuv
- wxyz0123
- 456789?!
Add Comment
Please, Sign In to add comment