Level 8 - State Machines and Complex Dependencies (Puzzle 4)
Below is a puzzle involving 24 input buffers and their transformed outputs. Each buffer is exactly 64 bytes, shown in hex. Your task: Figure out the logic of the transformation used to go from the INPUT to the OUTPUT. Then, provide a Python function that, given any new 64-byte buffer, will produce the correct transformed output. Here are the 24 input (SRC) buffers in hex (one line per buffer): INPUT #01: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #02: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #03: 01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #04: 02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #05: 80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #06: aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 INPUT #07: 00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #08: f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #09: 0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #10: 55ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff INPUT #11: 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f INPUT #12: fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0dfdedddcdbdad9d8d7d6d5d4d3d2d1d0cfcecdcccbcac9c8c7c6c5c4c3c2c1c0 INPUT #13: aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55 INPUT #14: 55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa55aa INPUT #15: f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0 INPUT #16: 0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f INPUT #17: 01010101010101010202020202020202040404040404040408080808080808081010101010101010202020202020202040404040404040408080808080808080 INPUT #18: 01010101020202020202020203030303040404040505050508080808090909090101010102020202020202020303030304040404050505050808080809090909 INPUT #19: 0102040810204080010204081020408001020408102040800102040810204080fefdfbf7efdfbf7ffefdfbf7efdfbf7ffefdfbf7efdfbf7ffefdfbf7efdfbf7f INPUT #20: 48656c6c6f2c20576f726c64212048656c6c6f2c20576f726c64212048656c6c6f2c20576f726c64212048656c6c6f2c20576f726c64212048656c6c6f2c2057 INPUT #21: 4c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742c2073656420646f20 INPUT #22: 0101020305080d1522375990e97962db3d18556dc22ff12011314273b528dd05e2e7c9b07929a2cb6d38a5dd825fe140216182e36548adf5a29739d009d9e2bb INPUT #23: 789b34caf54f2e220acd941e71b88d5836866d0d858b63549e94be2cacc67f5b7ef28f2d9903959f63d3d893dce752779c84162917ec8ff1af4a6422d367e18d INPUT #24: c5d71484f8cf9bf4b76f47904730804b9e3225a9f133b5dea168f4e2851f072fcc00fcaa7ca62061717a48e52e29a3fa379a953faa6893e32ec5a27b945e605f And here are the corresponding transformed outputs (DST) in hex: OUTPUT #01: 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #02: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc OUTPUT #03: 32cccccc333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #04: 31cccccc333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #05: b3cccccc333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #06: 99cccccc333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 OUTPUT #07: 33cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc OUTPUT #08: c3cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc OUTPUT #09: 3ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc OUTPUT #10: 66cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc OUTPUT #11: 33323130373635343b3a39383f3e3d3c23222120272625242b2a29282f2e2d2c13121110171615141b1a19181f1e1d1c03020100070605040b0a09080f0e0d0c OUTPUT #12: cc323130373635343b3a39383f3e3d3c23222120272625242b2a29282f2e2d2c13121110171615141b1a19181f1e1d1c03020100070605040b0a09080f0e0d0c OUTPUT #13: 9999ffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaa OUTPUT #14: 6699aaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaffaaff OUTPUT #15: c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3 OUTPUT #16: 3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c OUTPUT #17: 3232323232323232313131313131313137373737373737373b3b3b3b3b3b3b3b232323232323232313131313131313137373737373737373b3b3b3b3b3b3b3b3 OUTPUT #18: 3232323231313131313131313030303037373737363636363b3b3b3b3a3a3a3acdcdcd3231313131313131313030303037373737363636363b3b3b3b3a3a3a3a OUTPUT #19: 3231373b231373b35657593b231373b35657593b231373b35657593b231373b3cd52503b231373b35352503b231373b35352503b231373b35352503b231373b3 OUTPUT #20: 7b565f5f5c8175acc441c1b9edec9dba5f5f5c8175acc441c1b9edec9dba5f5f5c8175acc441c1b9edec9dba5f5f5c8175acc441c1b9edec9dba5f5f5c8175ac OUTPUT #21: 7f5c41bac275bec54046c275b9c4c1c4c775c8bec975b6c2bac98175b8c4c3c8bab8c9bac9cac775b6b95a43bec8b8bec3bc75bac1bec98175c8bab9ecb9c475 OUTPUT #22: 32323130363b3e2611046aa3daceb730926daac2f184467566869740867d325a373c1e05b5e5f720c28dfa32d7b4369576b6d7d0ba9d024af7ecf5255e2e3710 OUTPUT #23: 4ba8891f4aa483eec622e973c60de2adfadbc262dae0b8a9f3e91381011bd4b0d347e482ee58eaf4b8282de8313ca7ccf1d96b7e6c41e446049fb97728bc36e2 OUTPUT #24: f6e469d94d24f0490cc48be59c85d5a0f3877afe46880a33f6bd4937dad3cb84215551ffd1fb75b6c6499d3a837ef84f8cefea94ffbde838831af7d0e9b3b5b4 Instructions: - Return just your best possible approximation as a small python function that takes a 64 byte array as input, and returns the 64 byte array as output. - Remember, the transformation is the same for all 24 buffers. - The function will be scored by the number of buffers that are correctly transformed (as shown in the 24 outputs). - And it also will be tested on another set of 24 hidden input buffers not shown in the prompt. - Do not include anything else in your response, no introduction text or explanations. Example Output: def transform(data: bytes) -> bytes: # Transform logic return bytes
Copy Puzzle Prompt
Submit your solution:
def transform(data: bytes) -> bytes: # Your solution here return data
Submit
Leaderboard